Freedom of religion allows a person or group to pursue the practice of their religion without governmental interference. It also protects those who do not follow a religion by shielding them from being forced to live in accordance with religious beliefs and values they do not agree with. The legalization of same-sex marriage is consistent with freedom of religion in that it removes from marriage laws religious notions that may have initially shaped those laws.
There is no hierarchy of religions in a society which truly honors freedom of religion. Accordingly, the religious views of no one particular group should be given preference in the development of marriage laws. While some religions don't support same-sex marriage, others certainly do support it. The most fair and ethical approach -- which treats all people equally regardless of religious affiliation -- is to factor out religious points of view when crafting marriage laws within a secular context.