In response to a very common question here on Daily Kos about the American political system (indeed, even Cindy Sheehan bemoans our party system in her farewell diary), I've decided to marry two parts of my life (graduate school and incessant vists to DKos) and explain why the two-pary system persists in the US. I'm currently finishing up my first year of a PhD program in political science. My primary field is American Politics, but my secondary field is Comparative Politics which has allowed me to come to some bit of understanding about party systems in other countries.
Electoral laws in a country - any country - indirectly determine the number of viable political parties. Because the US uses a pluralist (AKA "first past the post, winner-take-all") election system, third parties rarely have a chance at representation in the US Congress or in the White House.
So how does this work? The House of Representatives is composed of 435 members from 435 districts across the country. Each district gets exactly one representative. That representative needs to only win the most votes (not necessarily a majority) to become the representative of that district. The other candidates get nothing for coming in second or third. The same is true for the Senate, although Senators represent entire states, obiously. Each state gets two Senators and they run in separate elections on separate election years. Again, the candidate with the most votes gets the seat. The candidate in second, third, or fourth place gets nothing. You can extend this reasoning to presidential elections as well.
This creates pressure for parties to merge if they are on the same side of the ideological divide. Aside from Bernie Sanders (a Socialist) who hails from one of the most liberal states in the union, the most a third party has really ever accomplished electorally in national US politics in the past 50 years is to become a "spoiler." By the way, Sanders is, for all intents and purposes, a Democrat. He caucuses with them and votes with them most of the time.
This is very different from the electoral system of most European countries, which is typically "PR" (proportional representation) rather than pluralist. In that system, districts typically get more than one seat in the legislature. The seats are then apportioned according to vote percentage. For example, imagine a district gets 10 seats in the legislature and there are 3 parties in that district, Party A, Party B and Party C. Imagine there is an election and Party A gets 40% of the votes, Party B gets 30% of the votes and Party C gets 30% of the votes. Under the PR system, Party A would receive 4 of the district's seats, Party B would receive 3 of the seats, and Party C would also get 3. In this way, multiple parties are actually indirectly encouraged by the PR electoral system because even the minority parties receive representation.
You might think, "Well, why doesn't the US just change electoral systems?" Easier said than done. There is overwhelming opposition to such a thing, mostly because the legislators that would have to undertake such a change are perfectly happy with the electoral system the way it is - it worked for them! For further proof of this opposition, you might check out the case of Lani Guinier, who was nominated by President Clinton to the position of Assistant Attorney General for Civil Rights. When it came to light that she advocated a system of Proportional Representation, it became impossible for her to be confirmed in the position and Clinton had to nominate someone else.
I hope that helps understand why we have a two party system in the US. I'll be happy to answer any and all questions and add clarity where I can.