I've been big on naval history and have a deep fascination with ships for years now. The question above pretty much outlines it: why did vessels go from square sales to lateen sales to square again?
Thanks guys!
Well, first off, I would say that this isn't an entirely clear-cut process; there were ships using square sails when lateens were prevalent, and vice versa, and the "classic" full sail rig we think of developing around the time of the Napoleonic wars incorporated fore-and-aft sails. HMS Victory was launched in 1765 and as built had a mizen course with a long lateen-style yard.
As far as we know, both the classical-era Mediterranean galley and the ships of the era in northern Europe carried a square sail. That's most likely because the sail was meant to provide power, but the ship's oars allowed it to move without the sail, so sail power for traveling upwind was less of a consideration than it would be as ships got bigger. It's also fairly simple to make and rig a square sail, in terms of both the cloth-making and also the tackle for the mast and yard.
In terms of the "progression" of sail rigs, the lateen rig seems to have entered the Mediterranean around the late second/early third century. The advantage of the lateen is that it allows for the ship to work upwind more easily, as the triangular sail can be braced around more forward. The disadvantage is that it takes either a large crew or a great deal of time to tack or wear with a lateen, as you have to pass the yard entirely around the mast to do so (unless the boat is extremely small or you're in very light airs).
Moving forward substantially in time, we see the lateen rig exit the Mediterranean and be used in western ships around the time of the Portuguese voyages of exploration, when the caravel and carrack style ships appeared. The caravel was generally smaller than the carrack, and could carry either a square or lateen rig, and the carrack was generally larger and would generally mix the rig, with square sails forward for driving force and lateen sails aft. Some carracks could be quite large -- Henry VIII's large ships were carracks -- but nearly all of them lacked what we'd later call a "made mast," that is one comprised of several sticks above one another. The Mary Rose pictured above has only topmasts, for example.
As the carrack style developed into the galleon, you started to see a more or less standard large ship type with usually four masts, usually at least two lateen rigged. The classic galleon, though, was a very large ship with very many men on it, and they could afford the manpower to work four lateen sails (two courses and two topsails).
If you're talking about the earliest version of the "standard" square rig of the Napoleonic period, the fluyt is probably the first ship to have it, where you have two entirely square-rigged masts and a lateen on the mizen. This was a sail plan that provided good driving force but maneuverability with the fore-and-aft jibs and the mizen lateen, and didn't cost too much in manpower (that is, it could be handled by a merchant crew). The Dutch ships' sail plan and hull form was copied by other designers, and gave rise to the "classic" man of war plan, with additional masts (royals and above) added, and the lateen being supplemented by staysails and multiple jibs. The gaff spanker replaced the lateen course by the latter part of the 18th century, although as we saw above ships retained the lateen yard, vestigially, even late in the century.
Edit: I can't spel gud
Some clarification on terminology: square sails are so called not because they have a square shape, but because their neutral position is square, i.e. perpendicular, to the length of the ship.
A lateen sail is a type of fore-and-aft sail, whose default alignment is along the length of the ship. Other types of fore-and-aft sails are the gaff rig and the Bermuda rig.
There are multiple tradeoffs in these types of sails, but historically many sailing ships with multiple sails have had a combination of both.
The first thing is what route the ship is intended to run. Ships that travel along the trade winds doing trans-oceanic shipping will primarily be going downwind so they don't need fore-and-aft sails as much and downwind performance is more important.
Ships that run along the coastline, eg shipping or fishing need fore-and-aft sails because the winds are more variable, and because if the wind is blowing toward the coast you need to be able to point into the wind to avoid getting shipwrecked, or get anywhere really.
This is part of the reason why lateen sails are emphasized in the story of Portugese exploration of the African coast - since they were proceeding along the coast they needed that ability. But for instance in the pacific islands and the Indian Ocean a lot of exploration was done with square sails.
In the 19th century two important American sailing ship types were the clipper, which was a square-rigged trans-oceanic shipping vessel, and the schooner, which had fore-and-aft sails and did shipping and fishing along the coastlines.
Another tradeoff is manpower. /u/jschooltiger points out that a lateen sail can be difficult to tack, but other fore-and-aft sails do not have that problem. In particular, a bark rig, which has square sails on the first few masts and a fore-and-aft sail on the rearmost mast, is said to have gained prevalence because it required a smaller crew than a ship with square sails on all the masts (called a full-rigged or ship-rigged vessel).
However, one problem with fore-and-aft sails is that they are asymmetrical when going downwind. This makes them dangerous because a wind shift can cause them to swing violently to the other side. For this reason, square sails have sometimes been preferred in long range shipping even if technically a fore-and-aft sail might provide better performance.
Another issue is that a square rigged mast will usually have multiple smaller sails, while a fore-and-aft sail on the same mast will be bigger. This can make it more difficult to control and reducing sail in a downwind scenario can be impossible, because the ship must head to wind to relieve the load on the sail, and turning a ship around in heavy seas can sink the ship.
Another consideration is that before synthetic materials, both lines (I.e. ropes) and sails themselves were weaker. So the very large fore-and-aft rigged yachts that we see today would have been more technically challenging before the 1950s when such materials became available. Modern pleasure boats are also generally derived from a tradition of racing yachts which has also influenced the rigging styles we see in sailing today.
I'm sure there are other things I've left out, but the point is that it's not a straightforward evolution as typically presented in basic narratives of European exploration.