Because they invest much more resources in giving birth and rearing children, women are generally pickier than men when choosing their sexual partners. They are harder to get than men.
Men on the other hand have high libido that motivates them to compete for women and to pursue them, often despite their reluctance.
Men could easily release the sexual tension if they could have sex with each other instead of women. However such behavior would lead to lower chances for reproduction. So, the evolution came up with a solution: man feel repelled when thinking about having sex with other man.
In other words, males have an innate revulsion towards sexual interaction with other men (i.e. gay sex). Otherwise they would be releasing their sexual tension by having sex with each other instead of pursuing women. I suspect this mechanism has been around for many million years. It was created in our ancestral animals (which could not masturbate) and lingers on since then.
Women on the other hand do not have to compete or pursue men as vigorously, and so their everyday libido is at a lower level. They do not need the protection against the possibility of releasing their sexual tension in an evolutionarily disadvantageous way – because they do not have as much tension. As a result, they do not have the same innate revulsion towards lesbians as men have towards gays.
Also, according to this hypothesis, men do not have reasons to feel revulsion towards lesbian sex and women do not have reasons to feel revulsion towards gay sex. It seems that these predictions more or less conform to reality.
In the end, the discrimination of gays comes from the fact that men are naturally repelled by gay sex for evolutionary reasons. The reason why this sometimes extends to the entire society being against both gays and lesbians is trough guilt by association often institutionalized by various cultural vehicles like religious scriptures.
Literature on attitudes towards homosexuals
- Sex Differences in Attitudes Toward Homosexual Persons, Behaviors, and Civil Rights A Meta-Analysis
- Heterosexuals' Attitudes toward Lesbians and Gay Men: Correlates and Gender Differences