Homosexuality (and other sexual orientations) have existed throughout history.
So what events or sequence of events sparked the change in how non-heterosexual practices were viewed: from not caring to discriminating to moderate acceptance?
I understand this answer probably varies greatly between cultures so focusing on Western culture.
Consider these:
FAQ on Gender and Sexuality which includes questions about how homosexuality was viewed across different cultures and times
Additionally in the FAQ is Early Christianity which contains two questions dealing with the relationship between early Christianity and homosexuality. ("When did controlling cultural sexuality become such a major issue for Christians?" and "Why was Christianity in the Middle Ages so intolerant").