There is no way to know when homosexuality first came to exist. There is, of course, very little evidence for sexual practices in prehistoric times. We know people had sex since procreation occurred, but we cannot know much about any details such as marriage practices or anything like that. It is also very difficult to think of how we might find evidence that homosexuality had existed.
For example, we see in this link that one group of researchers believes that they have found evidence of a person who was homosexual or transsexual. Their evidence for this is that the skeleton is biologically male but has been buried in a way that was reserved for women in that particular culture. In the time before writing, this is about as much as we can hope for in terms of “proof” of homosexuality.
As another example, there are those who believe that there is pictorial evidence of homosexuality in an Egyptian tomb. This is a tomb dedicated to two men. The men are depicted in positions that some people say are intimate. However, there is no written proof of homosexuality and others say the men were brothers.
Our first true proof of homosexuality in history comes from Ancient Greece. There, relations between older and younger men were quite common.
In my opinion, homosexuality has always existed. In modern times, we know that it has existed in cultures all over the world. It seems unlikely that it spontaneously came to exist in all of these cultures in recent times. Because of this, and because I believe that it is an inborn trait, I believe that homosexuality has always existed among human beings.
I dont think there was ever a sudden time that it just came to exist. I mean we see it rumored with people in history and I think the reason people kept homosexual relaionships in hiding back then was because they were afraid it would be seen as abnormal and back then people likes to appear pristine and up to date.