Article I Section 10 of the US Constitution outlines the powers of the states and of the Legislature. This Section is known as the Contracts section because it protects civil contracts from interference by the State and the US Government. What is an example of a Civil Contract? Marriage Licenses.
Marriage Licenses used to be called Marriage Contracts, in which two individuals entered into a binding legal contract to share assets. Ever wonder why you have to go to court to get a divorce? That's why.
Therefore, Same Sex Marriage has been legal in the United States since 1789.
However, States have erected road blocks to this, which is a violation of Article I Section 10. With few exceptions (the exceptions being states admitted to the United States after 1860), the laws are not in the State Constitutions, rather, are found within State Level Civil Law (also known as Statutes). Recent history has shown these statues can be overturned in a court of law. An example would be Gryczan v Montana (1997) , in which the State Supreme Court ruled that the sodomy law was unenforceable and unconstituional. Another example is Lawrence v Texas (2003), in which the US Supreme Court ruled that the sodomy law was unconstitutional, and upheld the ruling of Gryczan v Montan (1997). Lawrence v Texas (2003) also was the case that made same sex relations officially legal in the United States, overturning a previous ruling, Bowers v. Hardwick (1986).
The laws found within State Constitutions, however, are in violation of Article I Section 10.
Another issue deals with State to State reciprocity of marriage licenses. In 1993, Hawaii voted to allow same sex marriages, however, other states did not recognize the marriage licenses as valid, and within a year, the vote was overturned.
This is not the first time states have not recognized licenses or permits between one another, marriage or not. Licenses are basically contracts made either between two individuals or an individual and a government (State or Federal. To join the military, you sign a contract). I could use the example of a driver's license, however, every state recognizes each others' licenses, so it's a poor example. The best example of this would be Concealed Carry Licenses. A person wanting a Concealed Carry License enters into a contract with the state saying that they will not abuse the license in any form or fashion, however, not every state will recognize this license. If you go to https://www.usconcealedcarry.com/travel/ there is a full list (with interactive map) of the states who recognize concealed carry licenses of other states. For kicks, let's look at Montana, one of the more easier states to get a concealed carry license. All the states the honor the Montana CC License are in Blue, all states that don't are in Red. Most of the states in Red do not reciprocate the license either because of law (CC is illegal in Illinois), or because their requirements for obtaining a CC License are higher than Montana (Like California).
Now, in order to make every state recognize a license or permit, the license would have to be recognized on the Federal Level. Take pilot's licenses. When airplanes started to go from curiosities owned only by the rich to warplanes to cheap war surplus everyone could buy after WWI, the US created the Civil Aviation Administration in order to license pilots. This was done because each state was starting to develop their own requirements for pilot certification. In order to stop this, the CAA began issuing licenses recognized on the Federal Level, and by extension, must be recognized by all states. This prevented what occurred during the automobile craze during the early 1900's. In order to make every state recognize same sex marriage licenses, the license would have to be at the Federal Level.
Long and short: Because of Article I Section 10, Same Sex Marriage has been legal in the US since 1789. Most states define marriage in their Civil Code of Law, which can be easily overturned. In order to make every state recognize Marriage Licenses, whether they be for man and woman, man and man, woman and woman, etc., the license would have to be issued at the Federal Level, not State or Local.