I believe homosexuality derives from either: 1. Social distortion, meaning society affects someone in a way that makes the believe they are attracted to the same sex. 2. Hormone imbalance, not enough testosterone/estrogen or other chemicals. 3. Confusion of stimuli, the confusion of stimuli is my favorite explanation, it means that early in one's child hood, a stimulus occurred that was either rewarded or justified by the individual causing a confusion in sexual preferences.
And then there is always the fourth option saying that's just the way things are..... But that wouldn't be applying science.