It seems pretty clear that the ousted president was behaving illegally and unconstitutionally.
As the general elections scheduled for November began to creep up, Mr. Zelaya decided to hold a referendum with the ultimate aim of allowing him to seek re-election. The move violated articles of the Constitution that forbid changes to the presidential limit of one four-year term and establish the legal procedure for constitutional amendments. The electoral court, the Supreme Court, the attorney general, Congress and members of his own party declared Mr. Zelaya’s intention unlawful. Then, on Sunday, the military stepped in.
At the same time, there should be ways to head that off other than by military coup. This piece from the Independent Institute illustrates the problem. Here is their summary:
The crisis in Honduras is, in a word, complicated. Although deposed President Manuel Zelaya bears the brunt of the blame for his ouster, the military actions against him were ill advised and play into the hands of Zelaya's anti-democratic allies in the region, according to Independent Institute Senior Fellow Alvaro Vargas Llosa.
Zelaya acted unconstitutionally by taking steps to seek reelection, and he followed that misdeed with an even more brazen one: breaking into the location of the impounded election ballots in an effort to distribute them. Yet the response from the Organization of American States has been to ignore Zelaya's dictatorial conduct, just as it ignored similar violations by Chavez in Venezuela, Morales in Bolivia, Correa in Ecuador, and Ortega in Nicaragua. Supporters of the military action may come to regret Zelaya's propaganda victory in a conflict that bodes poorly for the rule of law.
As the Honduras imbroglio illustrates, the trick for Latin America is to avoid the extremes of the left and the right. Vargas Llosa concludes: "Honduras' crisis should bring to people's attention this truth about Latin America today: The gravest threat to liberty comes from elected populists who are seeking to subject the institutions of the law to their megalomaniac whims. Given that scenario, the hemisphere's response to Honduras' crisis has undermined those who are trying to prevent populism from taking the region back to the times when it was forced to choose between left-wing revolution and military dictatorships." [emphasis added]
Also see Llosa's piece in the NYTimes on why the primary winner in Honduras could well end up being Hugo Chavez.