Since the primaries are the hot topic in the news right now, I thought I'd provide some history to go with them.
Wikipedia provides a nice summary of the history leading to the current method of primary elections:
There is no provision for the role of political parties in the United States Constitution, as political parties did not develop until the early 19th century. Before 1820, Democratic-Republican members of Congress would nominate a single candidate from their party. That system collapsed in 1824, and by 1832 the preferred mechanism for nomination was a national convention.
Delegates to the national convention were usually selected at state conventions whose own delegates were chosen by district conventions. Sometimes they were dominated by intrigue between political bosses who controlled delegates; the national convention was far from democratic or transparent. Progressive Era reformers looked to the primary election as a way to measure popular opinion of candidates, as opposed to the opinion of the bosses. In 1910, Oregon became the first state to establish a presidential preference primary in which the delegates to the National Convention were required to support the winner of the primary at the convention. By 1912, twelve states either selected delegates in primaries, used a preferential primary, or both. By 1920 there were 20 states with primaries, but some went back and from 1936 to 1968, 13 or 14 states used them. (Ware p 248)
The primary received its first major test in the 1912 election pitting incumbent President William Howard Taft against challengers Theodore Roosevelt and Robert La Follette. Roosevelt proved the most popular candidate, but as most primaries were non-binding "preference" shows and held in only fourteen of the-then forty-eight states, the Republican nomination went to Taft, who controlled the convention.
Seeking to boost voter turnout, New Hampshire simplified its ballot access laws in 1949. In the ensuing "beauty contest" of 1952, Republican Dwight Eisenhower demonstrated his broad voter appeal by out polling the favored Robert A. Taft, "Mr. Republican." Also, Democrat Estes Kefauver defeated incumbent President Harry S. Truman, leading the latter to abandon his campaign for another term. The first-in-the-nation New Hampshire primary has since become a widely-observed test of candidates' viability.
The impetus for national adoption of the binding primary election was the chaotic 1968 Democratic National Convention. Vice President Hubert Humphrey II secured the nomination despite primary victories and other shows of support for Senator Eugene McCarthy, running against Humphrey on a strong anti-Vietnam War platform. After this, a Democratic National Committee-commissioned panel led by Senator George McGovern recommended that states adopt new rules to assure wider participation. A large number of states, faced with the need to conform to more detailed rules for the selection of national delegates, chose a presidential primary as an easier way to come into compliance with the new national Democratic Party rules. The result was that many more future delegates would be selected by a state presidential primary. The Republicans also adopted many more state presidential primaries.
With the broadened use of the primary system, states have tried to increase their influence in the nomination process. One tactic has been to create geographic blocs to encourage candidates to spend time in a region. Vermont and Massachusetts attempted to stage a joint New England primary on the first Tuesday of March, but New Hampshire refused to participate so it could retain its traditional place as the first primary. The first successful regional primary was Super Tuesday of March 8, 1988, in which nine Southern states united in the hope that the Democrats would select a candidate in line with Southern interests.
Another trend is to stage earlier and earlier primaries, given impetus by Super Tuesday and the mid-1990s move (since repealed) of the California primary and its bloc of votes—the largest in the nation—from June to March. In order to retain its tradition as the first primary in the country (and adhere to a state law which requires it to be), New Hampshire's primary has moved forward steadily, from early March to early January.
You can also read a nice history at the American Presidency. If you'd like to see the results of the last few primary elections, you can use Dave Leip's Atlas of Presidential Elections (this only goes back to 2000).
Now the Wikipedia mentions the "chaotic" 1968 Democratic convention and you can a first hand report of this event on PBS's site (this is definitely an interesting read).