The federal government does not provide any protection against discrimination in rental housing based on sexual orientation or gender identity. However, if you live in one of the states that prohibit discrimination on the basis of sexual orientation in businesses that serve the public (see Nolo's article Healthcare Antidiscrimination Laws for Gays and Lesbians), a landlord may not refuse to rent to you because you are lesbian or gay. Likewise, landlords in these states cannot terminate a lease or end a month-to-month tenancy because of your sexual orientation. Some of these states also include transgendered status in the class of people protected from discrimination. And some cities offer protections too.
If your state does not have antidiscrimination laws protecting you, then your landlord can legally refuse to rent to you because of your sexual orientation. However, your landlord probably can't terminate your lease early unless you've violated a lease clause. You won't get much protection in a month-to-month tenancy though, unless you live in a rent controlled area, which might make it harder for the landlord to terminate the tenancy. To learn more about the law in various states, see Nolo's article Tenant Rights Against Sexual Orientation Discrimination.