As a general rule, spouses of U.S. citizens are eligible to apply for lawful permanent residence (a "green card") in the U.S. This general rule applies to the spouses of all married citizens—including same-sex partners. However, there are nuances that might affect the process of getting a marriage-based green card for same-sex couples, as described below.
For years the U.S. Congress, as well as U.S. Citizenship and Immigration Services (USCIS) insisted that heterosexual marriages were the only ones that counted for immigration purposes. A law called the "Defense of Marriage Act" or DOMA had defined "marriage" as between a man and a woman, with the result that only heterosexual partners could petition for a green card for their foreign-born spouses.
However, as a result of the U.S. Supreme Court's decision in United States v. Windsor, same-sex foreign spouses of U.S. citizens and permanent residents became eligible to apply for green cards. The Court held that DOMA violated the equal protection guarantee of the U.S. Constitution and that the federal government cannot discriminate against married lesbian and gay couples for the purposes of determining federal benefits and protections.
The bottom line is that any same-sex marriage that is legally recognized in the United States or in the country where it took place counts for U.S. immigration purposes.
Just like a same-sex couple, you'll have to prove that your marriage is legally valid in the place it occurred. After the Supreme Court's later decision in Obergefell v. Hodges, all states must recognize same-sex marriages performed anywhere within the United States. Thus, if you and your spouse were married within the U.S., meeting the legal-marriage requirement isn't a problem. The USCIS also recognizes same-sex marriages that took place outside the United States, as long as the marriage is legally recognized in the country in which it occurred.
However, many countries still don't recognize same-sex marriage. In some of these countries, travel might be difficult for the foreign spouse, making it particularly difficult to enter into a legally recognized marriage. (It's important to make sure that you don't try to get around this problem by getting a tourist visa to enter the U.S.—this could be considered visa fraud, and could result in denial of a green card. See the discussion below about fiancé visas.)
In most circumstances, you can prove legal marriage by presenting a copy of your marriage certificate. Note that USCIS usually requires that you have a certificate created by an official governmental agency rather than a church or other nongovernmental entity. If you're married abroad, see what your options are for getting a certificate that's officially recognized, registered, or issued by a governmental agency.
Another requirement for a marriage-based green card is that the marriage is "bona fide"—meaning you didn't get married simply to provide the non-citizen with a pathway to citizenship. USCIS typically requires all couples to provide copies of documents such as photos of the wedding, letters, bills or statements showing you live together, and children's birth certificates.
If your foreign-born fiancé is out of the country, but you want to get married in the United States, your best option is probably to get a K-1 fiancé visa. A K-1 visa allows your fiancé to spend 90 days in the United States. While your fiancé is in the country, you can get married, and then apply for "adjustment of status," in other words, U.S. lawful conditional residence.
The legal requirements for getting a K-1 visa for same-sex couples are the same as those for different-sex couples. Perhaps most importantly, you must intend to get married. The U.S. government will require more than just a general goal of tying the knot—you'll have to provide evidence of plans, such as reservations for a venue or an appointment to appear before a judge. It's a good idea to make sure your plans are flexible, though, because there's no guarantee of how long it will take to get approved for the fiancé visa.
You'll also have to demonstrate that you and your intended spouse have met in person within the two years immediately before filing the I-129F petition for the fiancé visa. Finally, you must legally be able to marry. Being a same-sex couple is no longer a barrier to getting a legal marriage in the U.S., but you'll want to make sure that you meet all the other requirements for getting a marriage license.
For more information, check out Nolo's Fiancé & Marriage Visas: A Couple's Guide to U.S. Immigration. The USCIS also offers an online policy manual that includes a section on immigration for spouses of U.S. citizens. Finally, Nolo has an online section addressing marriage-based green cards, which goes into greater detail on many of the topics addressed in this article.