DOMA is unconstitutional as a deprivation of the equal liberty of persons that is protected by the Fifth Amendment.
It was a 5-4 decision authored by Justice Anthony Kennedy (link is to full opinion), with dissents from Chief Justice John Roberts and Antonin Scalia and joined in parts by Clarence Thomas and Samuel Alito. From the opinion:
"DOMA singles out a class of persons deemed by a State entitled to recognition and protection to enhance their own liberty."
To be clear, the opinion notes that it applies only to lawful marriages. I don't think this bodes well for a sweeping ruling in Prop. 8, which isn't surprising. Chief Justice John Roberts is expected to write for
Also from the opinion, as cited by scotusblog.com
There is a "careful consideration" standard: In determining whether a law is motivated by improper animus or purpose, discriminations of an unusual character especially require careful consideration. DOMA cannot survive under these principles.
The federal statute is invalid, for no legitimate purpose overcomes the purpose and effect to disparage and injure those whom the State, by its marriage laws, sought to protect in personhood and dignity. By seeking to displace this protection and treating those persons as living in marriages less respected than others.
Roberts and Scalia wrote that the court had no jurisdiction.
Interesting comment by a law professor to New York Times about longer-term consequences:'
But the reasoning in Justice Kennedy’s opinion — that the denial of recognition of same-sex marriage reflects animus and serves no legitimate purpose — provides a basis for challenging state laws denying marriage equality. The case thus will lead to much more litigation as to state laws, but I think it is clear where the court ultimately will go in holding that laws denying marriage equality deny equal protection. But it didn’t happen today.