At the cruising altitude of most airliners, there is no noticeable aerodynamic difference between being over land or over sea. At lower levels, being over sea would typically offer less turbulence, in part because as the ground warms you can encounter rising air thermals.
Generally, airliners fly whatever route provides the shortest time, which is not always the shortest distance, often called the Great Circle route. The GC route is not always quickest because of jetstream winds.
One thing to consider when choosing between an over-land or over-sea route is the distance to another airport should an engine fail. You might have heard of ETOPS. Basically, twin engined aircraft must fly within a certain distance of a suitable landing site - often 2 or 3 hours of flying time on one engine. In the middle of the ocean the quickest route may take the aircraft outside of this range, so it will have to fly closer to land, or even in certain remote parts of the world, still over land.
Another consideration is life rafts. They are legally required when flying more than 25 miles (if I recall correctly) out to sea. Life rafts add weight and therefore cost so some airlines have actually removed life rafts from their aircraft, or at least only have a few of their jets allocated for flights over water.