All societies have laws that are based on what things those socieites believe are moral and what things they believe are immoral. For example, we have laws in the United States against women going topless in public and against men or women exposing their genitals in public. There are no reasons for these laws other than the fact that our society thinks that those actions are immoral.
If same sex marriages should be illegal in the US, it is for this same reason. They should be illegal (you can argue) if the majority of people think that they are immoral. Some people argue that laws should not impose some people's morals on others, but the truth is that we do that with so many of our laws.
While I, personally, believe gay marriage should be legal, I also understand that that is a matter of my own morality and nothing more. I cannot draw a moral and principled line, for example, to explain why gay marriage should be legal but polygamy should not be. It is just a matter of what we think is moral or not.
So, if gay marriage should be illegal, it is because enough people find such marriages to be morally offensive. Society has the right to (within limits) make laws to enforce its morality.