When you log on to Travelocity or Orbitz it's always a crap shoot as to how much your plane ticket will cost. But there's definitely reasoning behind the wildly varying pricing of seats.
It's not much of a surprise that earlier seats are cheaper seats, but that's not always the case. According to a recent report, buying tickets too early "before airline analysts have had a chance to mintor supply and demand and set ticket prices accordingly, can actually hurt customers." The sweet spot to buy tickets, according to Kayak.com, is 21-35 days before domestic flights and three months before international trips.
You may have noticed that flying out of major airports — think LAX or Chicago's O'Hare International — is cheaper than local ones. Larger airports have a bigger supply of seats compared to smaller, regional airports.
Business travelers also make up a big cut of airlines' profits; they make more last-minute trips and are more willing to pay higher fares (because their employer is usually footing the bill). American Airlines, in fact, makes 70% of their revenue from 20% of their fliers. That's why almost all American flights pass through at least one center of commerce and business, e.g. New York City, Miami, Dallas, etc.
What's interesting is that sometimes a full plane doesn't mean a profitable plane. If the jet is filled with mostly leisure travelers who booked at just the right time — i.e., before the airline could reasses demand and adjust prices — the plane could still not be making money for Delta, American, or Virgin. While some airlines have flirted with setting standard fares, think JetBlue, many return to the seemingly-more arbitrary method employed by the major carriers.