I'll post what I had in another thread:
There are in fact plenty of theories and proposed explanations, and we are learning more every day due to advances in genetics and evolutionary biology. I'll list a few of the existing theories, bearing in mind these are short summaries:
1. The most prominent genetically based theory that exists today comes from research conducted earlier this year which gathered some evidence indicating that homosexuality may be related to a gene passed down matrilineally which relates to female fecundity and as a result may only have a tangential relationship as it increases the reproductive value of females by making them more attractive to males and relaxed to increase child bearing potential. It is a mistake to assume that selection pressures always produce reasoned or 'good' results, they are often completely unrelated to the gene that causes it. In this case the hypothesis is that it is an unanticipated balancing act of evolution, a common theme.
Factors Associated with Higher Fecundity in Female Maternal Relatives of Homosexual Men - Camperio Ciani - 2012 - The Journal of Sexual Medicine - Wiley Online Library
Male Homosexuality Can Be Explained Through A Specific Model Of Darwinian Evolution, Study Shows
2. Another common theory relates to pre-natal hormones and the impact that this has on human sexuality, as observed in both humans and test subjects like Rhesus Monkey's. In essence the idea being that in a small but predictable portion of the population (2-3%) differing hormonal balances affect the development of the fetal brain and contribute to the development of homosexuality. So the presence or absence of certain levels of testosterone, androgens, etc. This may or may not be related to the genetic argument made above.
Homosexuality and Biology - Chandler Burr - The Atlantic (a section discusses thus)
3. It may also have its relationship in several hypothesized evolutionary advantages that include anything from kin selection to advantages in actually acquiring a mate. For example a common theme in the animal world is observing animals that engage in homosexual behavior (usually among animals that have relatively exclusive sexual patterns) who will then in turn in the absence of other males mate with a female. Termed popularly the 'sneaky ****er' rule by some evolutionary biologists it is the idea that males who fall on some spectrum of homosexuality can evade their more aggressive male contenders who will dismiss them as rivals and instead will mate when the other males are away. This allowed homosexuality to perpetuate.
These are only a few theories mind you, but there is reams of literature on the subject and it is an emerging field with new discoveries and revelations constantly coming to the fore.
Edit: Also Epigenetics is probably pretty important alongside regular genetic reasons. It is widely believed that there is multiple biological causality for homosexuality and that it is what helps result in the spectrum we see.