I am a gay male U.S. citizen. My partner is a male citizen of Pakistan, here on a student visa. He is smart, and people have said they would hire him if only he had a green card. If we get married, can he get a green card?
The answer to this question was once a categorical "no," as historically, 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.
However, the U.S. Supreme Court's decision in United States v. Windsor to overturn a provision in the Defense of Marriage Act ("DOMA") means that the same-sex foreign spouses of U.S. citizens and permanent residents are now eligible to apply for green cards.
Because immigration law is federal and DOMA defined marriage as between a man and a woman, this law said that only heterosexual partners could petition for a green card for their foreign spouses. As a result, even if you were married in one of the U.S. states or countries that then recognized same-sex marriage, you could not sponsor your foreign spouse for a green card or bring your foreign fiancé to the U.S. for purposes of getting married.
That has all changed, thanks largely to the Windsor ruling and to the Supreme Court's subsequent (2015) ruling in Obergefell v. Hodges, which additionally required all U.S. states to license marriages between two people of the same sex and to recognize a marriage between two people of the same sex when their marriage was lawfully licensed and performed in another state.
Any same-sex marriage that was officially, legally recognized in the U.S. or the country where it took place now counts for U.S. immigration purposes. You may want to read Nolo's article, "Sponsoring a Fiancé or Spouse for a Visa or Green Card," for the basics of the application process.