Many same-sex couples get married in a state that recognizes same-sex marriage. Previously, those marriages, although valid in a same-sex marriage equality state, were not recognized by the United States federal government because the federal Defense of Marriage Act (DOMA) specifically defined marriage as a union between a man and a woman.
Since the U.S. Supreme Court struck down DOMA's definition of marriage as unconstitutional, the federal government must now recognize valid same-sex marriages.
However, the eligibility rules for benefits do vary among federal agencies. Some agencies, such as the US Citizenship and Immigration Services, the IRS and the US Office of Personnel and Management, will recognize all valid same-sex marriages, regardless of where same-sex married couples reside. All legally married, same-sex couples will qualify for immigration status, federal tax benefits and federal employee benefits (if either spouse works for the federal government), even if they reside in states that don't recognize their same-sex marriage.
But other agencies, such as the Social Security Administration, only recognize marriages that are valid in the state where the couple resides. So a same-sex married spouse living in a non-recognition state will not qualify for Social Security benefits under his or her spouse's work records.
Will another state, such as Texas, recognize a valid same-sex marriage from New York? When it comes to state recognition, the law is ever-changing. A few states, California and Washington, explicitly recognize same-sex marriages performed in other states or countries. It's also probably safe to assume that any of the jurisdictions where same-sex marriage is legal will also recognize same-sex marriages from other states. As of September 2013, these include California, Connecticut, Delaware, D.C., Iowa, Maine, Maryland, Massachusetts, Minnesota, New Hampshire, New York, Rhode Island, Vermont and Washington. Although Wyoming and New Mexico have not legalized same-sex marriage, courts in these states may recognize a same-sex marriage in order to grant a divorce.
Meanwhile, 36 states have constitutional amendments or state laws that restrict marriage to one man and one woman. None of these states are required to recognize same-sex marriages from other states for any purpose. However, some judges in states where same-sex marriage is not legal will and have recognized a same-sex marriage, for example, to grant a divorce. But without a uniform law that says all states must recognize out of state same-sex marriages, it's impossible to say what will happen in a non-recognition state.