The government's position is that the Guantanamo Bay detainees are unlawful combatants. They were not wearing uniforms, and they did not obey the laws and customs of war. This prevents them from being classified as POWs, according to Article 4 of the Third Geneva Convention.
Even POWs do not have a right to an attorney unless they're charged with a crime. And even unlawful combatants have rights under the Geneva Convention. They have a right to "three hots and a cot," freedom of religion, medical care and freedom from torture.
In the case of Jose Padilla, the man is an American citizen accused of being an enemy combatant. The legal precedent of Ex parte Quirin, 317 U.S. 1 (1942), is the controlling authority in this matter.
The ruling by the Court of Appeals of the Ninth Circuit is vulnerable to reversal. It was not a unanimous ruling: only two justices of the three-justice panel voted to give the detainees a right to counsel, and the third dissented. Upon review by the entire Ninth Circuit en banc -- a total of 14 justices, I believe -- it may be reversed. (That's what happened to the Pledge of Allegiance case.)
Of course, if the decision survives en banc review, there's always the Supreme Court.