In popular thinking, homosexuality is increasingly viewed as a justifiable, even somehow unavoidable, lifestyle, for those biologically predestined for it. One often hears in the media that one's sexual orientation is due to a sort of genetic fate. Below I have excerpted a useful and apropos paragraph from an excellent book I recently read.

"An area of particularly strong public interest is the genetic basis of homosexuality. Evidence from twin studies does in fact support the conclusion that heritable factors play a role in male homosexuality. However, the likelihood that the identical twin of a homosexual male will also be gay is about 20 percent (compared with 2-4 percent of males in the general population), indicating that sexual orientation is genetically influenced but not hardwired by DNA, and that whatever genes are involved represent predispositions, not predeterminations."

-- Francis S. Collins, "The Moral Practice of Science and Medicine: Bioethics," in The Language of God: A Scientist Presents Evidence for Belief (ISBN 9-780743-286398), 260.

In short, homosexuality is the result of  many factors: personal choice, upbringing, environment, conditioning. Genetics plays some role in sexual orientation, but it would be false to claim that it is the determining factor.