What are the differences between the "line ahead" and "line abreast" formations in naval warfare? Which is more likely to lead to the (advantageous) of "crossing the opponents' T" (or being crossed)?
Line abreast is sailing side by side, the line being perpendicular to direction of the motion (it's not an exclusively naval term - the formation exists for land forces and aviation as well).
^ ^ ^ ^ ^ ^ | | | | | | | | | | | |
Line ahead is a regular naval line of battle - ships sailing head-to-tail in a single line.
---> ---> ---> ---> ---> --->
The comparison tactics wise depends somewhat on what kind of ships you have - e.g. latter-day-age-of-sail ships of the line, galleys, or "modern" battleships/dreadnaughts.
For the sail ships of the line (those possessing broadsides), the answer is very simple. A line abreast means you are pointing your broadside at friendly ships at all times. There's no advantage at all, whether you're crossing the T or not.
For modern battleships/dreadnaughts (those possessing rotating turrets), the answer is almost the same.
However, with precise ranging and targeting in 20th century there is ONE possible tactical situation where line abreast works - when you bracket an enemy ship between your two abreast ships. Why?
Precision in ranging/targeting means that you have significantly less risk of hitting a friendly ship via overshooting.
For sail ships of the line, bracketing a parallel enemy ship means that the enemy can bring BOTH broadsides to fire, negating your firepower advantage of 2 ships each only of which only fires 1 broadside. 20th century battleships could bring all their guns to bear in any direction thanks to rotating turrets on centerline, so in this case all 3 ships are firing their guns, and now your firepower is 2-to-1.
For pre-broadside ships, where the armaments were the same or less on the sides as on the bow, the concept of crossing the T doesn't apply, and therefore there is absolutely no advantage to broadside-friendly line ahead formation (in reverse, your bow chasers point to friendly ships). Plus, as David Thornley noted in his answer, for ramming ships (both ancient and pre-battleship ironclads), facing the ram to the enemy was kind of important.
For modern missile cruisers, the whole concept of crossing the T is mostly moot point.
I'm going to answer for oared warships, such as dominated the Mediterranean from early times until the Battle of Lepanto in 1571 and afterward.
Early warships had, as their primary method of fighting, going alongside each other and fighting hand-to-hand. In this case, the line abreast was the right thing to do, as it would be easy for a line abreast to start doubling up against a line ahead.
Later on, methods of attack were developed that used the bow primarily. These include the ram, the Roman corvus, and guns on Renaissance galleys. In this case, line abreast is even more important, as this would cover the vulnerable sides and present the offensive bows to the enemy. There was a limit as to how many ships could be in a formation, though, as the galleys would try to stay side-to-side with neighbors. As the center ship moved slightly, the ships next to it would move a touch more, and this would propagate like cracking a whip so the end ships would have to make drastic movements.
The Battle of Lepanto is a good illustration of this. Since a line of galleys could be only so long, both the Christians and Muslims divided their fleets into three lines and a reserve. with the exception that the Muslim left (on the seaward flank) was deliberately overlong, accepting a disordered formation for a chance at outflanking the Christian right wing. (That did actually work, but the Christian victories in the center and their left meant that they won the battle.)