As you have probably already heard, yesterday's high-profile ruling in Perry v. Schwarzenegger overturned California's Proposition 8, a ballot measure barring the official recognition of same-sex marriage in that state. Judge Vaughn Walker ruled that the ban violates the Equal Protection and Due Process clauses of the Fourteenth Amendment, and his 138-page opinion included a few references to religion and religious beliefs, especially in his numerous findings of fact.

19. Marriage in the United States has always been a civil matter.  Civil authorities may permit religious leaders to solemnize marriages but not to determine who may enter or leave a civil marriage.  Religious leaders may determine independently whether to recognize a civil marriage or divorce but that recognition or lack thereof has no effect on the relationship under state law. (p. 60)

62. Proposition 8 does not affect the First Amendment rights of those opposed to marriage for same-sex couples.  Prior to Proposition 8, no religious group was required to recognize marriage for same-sex couples.  (p. 89)

77. Religious beliefs that gay and lesbian relationships are sinful or inferior to heterosexual relationships harm gays and lesbians. (p. 101)

In his consideration of the law, Walker deals with the issue of whether the presence of same-sex marriage violates the First Amendment rights of those opposed on religious and moral grounds.

The evidence shows that Proposition 8 does nothing other than eliminate the right of same-sex couples to marry in California. Proposition 8  is not rationally related to an interest in protecting the rights of those opposed to same-sex couples because, as a matter of law, Proposition 8 does not affect the rights of those opposed to homosexuality or to marriage for couples of the same sex.   (pp. 129-130)

Concluding, the judge argues that "a private moral view that same-sex couples are inferior to opposite-sex couples is not a proper basis for legislation."

In the absence of a rational basis, what remains of proponents’ case is an inference, amply supported by evidence in the record, that Proposition 8 was premised on the belief that same-sex couples simply are not as good as opposite-sex couples. Whether that belief is based on moral disapproval of homosexuality, animus towards gays and lesbians or simply a belief that a relationship between a man and a woman is inherently better than a relationship between two men or two women, this belief is not a proper basis on which to legislate.

California’s obligation is to treat its citizens equally, not to mandate [its] own moral code.” 
(p. 132-133)