The way I heard it, in my college zoology class, is that eggs, whilst in the ovaries, are essentially male or female (filled with either primarily testosterone (male) or primarily estrogen (female)). If a "male" egg is surrounded by "female" eggs, some of the estrogen from the female eggs will leak into the male egg and cause it to have a higher than normal estrogen level. If this egg is one that ends up being fertilized, tada, a homosexual you have. Same thing goes for "female" eggs surrounded by "male" eggs, producing a lesbian. Also, pollution is known to contain chemicals which can cause egg cell layers to weaken, thus allowing for more leakage, which may mean homosexuality is becoming more common than in the past and will become more common in the future.
This is just a theory from what I understand and I may be remembering it incorrectly as I took the class 4 years ago, but that's the way I understand it.