Banning same sex marriage violates the constitution because, as has been discussed in this thread, it applies the protections of marriage to some couples and not others, solely on the basis of discriminating against homosexuals. If there is going to be a law that affects the liberties of some people and not others, especially ones directly involving the government, there must be some compelling external reason. This is how the Equal Protection Clause of the 14th Amendment works. The law, both federal and state, is not allowed to arbitrarily discriminate. If it wishes to discriminate, it must prove that it has a good reason. No such reason has ever surfaced.