From a purely evolutionary standpoint, homosexuality may be seen to be a puzzling trait. As it doesn't increase -and in fact, can decrease- a person's reproductive success means that, according to the rules of natural selection, it should not be so common a trait as it is today, all over the world. Researchers have been trying to identify a genetic basis for homosexuality, seeing as how they seem to "run in families".
A new study has suggested that looking at the epigenome will be more fruitful than studying the genome. According to the article, some epi-marks (i.e. temporary switches that regulate gene expression) "affect sexual partner preference". Usually, epi-marks are "erased" between generations and are not passed on from parent to offspring. However, they can "escape erasure", and the sexual orientation of the parent can end up influencing the orientation of their offspring.
See here for a very unscientific response to the study: http://www.onenewsnow.com/media/2012/12/14/study-tries-to-link-homosexuality-to-evolution