I heard a radio story today about a Kentucky county clerk who is in court for failing to issue marriage licenses to same-sex couples, citing a religious exemption because her personal religious belief is that same-sex marriage is prohibited.
Her belief is protected by the US Constitution. The recent Supreme Court decision made abundantly clear that no religion or religious officiants would ever be required to preside over a wedding which violated their religious beliefs.
However, in the public sphere, marriage between two consenting adults, regardless of gender, is legal. So, in dealing with the public, the law is the determining factor. The religious belief of a clerk, justice of the peace, or judge should not be allowed to interfere with a lawful action by a member of the public. If it does, it violates the establishment clause which says that the state is not allowed to establish an official religion.
There are lots of instances where people of faith take actions in dealing with the public that may go against their personal tenets. For example, a Catholic judge may perform a civil wedding ceremony for a person who is a divorced Catholic who has not obtained an annulment from the church. A Catholic priest would not perform a sacramental marriage in that case, but a Catholic judge is not faulted in any way for fulfilling the civil duty of his/her office in performing a civil wedding.
The same reasoning extends to other public endeavors. A Morman server in a restaurant may serve alcohol or caffeine to restaurant patrons, even though the LDS church does not allow its members to consume them. A Jewish server can bring a customer a pork chop or shellfish, even though s/he may believe they are forbidden foods.
The bottom line is this: One may believe in whatever religion to which one is called and practice that religion freely. However, one may not impose this belief on another member of the public.