It seems that, in the modern era, being gay is seen as "immoral" the world over. When and why did sexual orientation by its modern definition become a concept?

by [deleted]

The fight for gender and sexual minority rights tells us that people the world over generally use a model of inherent attraction to define sexuality, that some kinds are demonized and others idolized. Historically, we know that this type of thinking was not the case. We've gone from a sort of "whatever goes" lack of identification in ancient Rome to today's system. How did we go from there to here?

Dkap322

Homosexuality and its study is a relatively recent field (although not so recent that it breaks this subreddit's rules). The word "homosexual" was coined by Karl-Maria Kertbeny in 1869. Soon after, in the late 1800s (about 1888) Richard von Kraft-Ebbing published Psychopathia Sexualis, which discusses sexuality, including homosexuality. Sexology became a genuine field of study and evolved over time (important figures include Karl Ulrichs, Alfred Kinsey, Sigmund Freud, although Freud may not have considered himself a sexologist). Much of the research and literature focused on whether homosexuality was a disease; was it genetic? How many people are homosexual? Is it acceptable (most sexologists felt that it was a sickness)? A lot of the research was conducted on prison inmates and inhabitants of insane asylums, thus leading to it being considered pseudoscientific. For example, studies may have shown that most homosexuals are insane, but the only people involved in the study were already in insane asylums and therefore clearly considered insane.

Even though many of the studies and works are not exactly academic, they had a large effect on the general population. The general public took a lot of the sexologists works very seriously and literally, thus aiding in forming modern-day views on homosexuality. The wealth of literature published on the topic also created a public discourse about sexuality.

source: course in LGBT history. Readings that cover the topic well including Medicalizing Sexuality by Jennifer Terry, Queer America: A People's LGBT History of the United States by Vicki Eaklor, and Odd Girls and Twilight Lovers by Lillian Faderman (covers lesbianism).

I hope this helps to answer your question!

caffarelli

Here's a quick intro to the evolution of gay identity in British/American culture from an old "History of Sexuality" AMA. Actually you should really have a read through that whole thing, there's a lot that would interest you.

Otherwise your question is too broad as written, "history of sexual orientation for everywhere through all time" is way too much for one expert to tackle. I could probably put you together a quick bibliography for homosexuality in Asia and the Middle East, but I only know about one book for Africa and none for Native American cultures.

If you're looking for more of a cross cultural analysis of "gay" in different cultures you might try /r/AskAnthropology.