I can't think of any circumstances where 'in the beginning... ' sounds better that "at the beginning... ", other than when imitating the first line of the King James Bible ("In the beginning God...