This short post is far from comprehensive and is based on much more research than is cited in it. I wrote it in February 2014 at the behest of a friend working in Kampala for the U.S. government.
The controversy regarding the “anti-gay law” in Uganda has turned to the issue of how people become homosexual. As an anthropologist, I’ve studied and taught about gender and sexuality at the university level in the United States, which has positioned me to explain what the research on this complex topic shows.
A homosexual orientation develops after conception and either during pregnancy (which is most likely) or in early childhood. One piece of evidence for this statement is that, despite numerous social influences encouraging a heterosexual orientation, homosexuals typically report feeling homosexual from their earliest memory. That is, there is no moment of conversion.
There is biological evidence that homosexuality develops early, too. Research suggests that there are multiple ways that a fetus or infant can develop into someone who will have a lifelong homosexual orientation. In some cases, patterns across multiple genes make it more probable that this will happen. However, plenty of people have these genetic patterns but don’t develop same-sex attraction. So there’s no single “gay gene,” and a fetus’ genetic profile only makes homosexuality more or less likely to develop.
Unfortunately, many people think that anything “in-born” must be genetic. But the fetal environment can have important effects on an individual’s ultimate development – think, for example, of the effects of a pregnant woman’s smoking or healthy diet. In short, hormonal differences – like the ones that made me left-handed – are another likely way that sexual preference is shaped. A specific influence is the mother’s previous pregnancies. The chance of having a homosexual son increases considerably for each son that she has already had, presumably because of her changing immune-response. But this applies only to right-handers, even though left-handedness by itself is more common among homosexuals. This is a further indication that there are multiple biological paths to same-sex attraction, each with different implications for other aspects of a person’s development.
The big point is this: A person’s sexual orientation is not due solely to his or her genetic makeup but develops for complex biological reasons before and/or soon after birth. Patterns of caretaking after birth apparently play no role in this.
Part of the evidence that sexual orientation isn’t learned is that there are, on average, specific physical differences between gay and straight men and between lesbians and straight women. For example, brain imaging shows similarities in particular parts of the brain between gay men and heterosexual women on the one hand and between heterosexual men and lesbians on the other. These key sections of the brain develop early in life and so cannot result from later sexual indoctrination. Thus, while same-sex attraction gets most of the attention, it’s really just one part of a complex of differences that result from these differing genetic and hormonal (and perhaps other) combinations – just as left-handedness is associated with attributes that have nothing to do with favoring one side of the body.
This description accounts for almost everyone who develops a homosexual identity or lifestyle. A homosexual orientation is not a choice. It is something that simply happens, with considerable regularity among all human groups and for biological reasons before or soon after birth. Homosexuals exist even in settings where a heterosexual orientation is assumed to be universal and is, nonetheless, promoted among even the youngest children. Homosexuals exist despite widespread discrimination and verbal and physical abuse – a situation that would discourage anyone who had a real choice.
A sexual orientation, however, is not a sexual act. People engage in sexual acts for any number of reasons. Sometimes they feel attraction to one gender but have sex with another. Indeed, because of social pressures, many homosexuals around the world have tried to resign themselves to exclusively heterosexual lives.
Other people will have sex against their orientation for money, out of curiosity, because they are raped, for religious reasons, and because they have no other potential partners. In the latter case, heterosexual soldiers, sailors, and prison inmates, for example, sometimes engage in homosexual acts without considering themselves to be homosexual. Possibly their patterns of attraction (not just their sexual interactions) extend temporarily to include members of the same sex. But their primary orientation, developed before or soon after birth, usually remains unchanged and will find expression again once they are regularly around members of the other gender.
Finally, it is possible that sexual orientations are more or less powerful at different points in people’s development. That is, some evidence suggests that adolescence is a relatively open time, when a person’s lifelong, dominant sexual orientation guides his or her behavior less than at other times.
To wrap up: even though there’s no “gay gene,” a great amount of evidence from a wide variety of sources indicates that homosexuality and heterosexuality are in-born, lifelong sexual orientations with diverse biological aspects that cannot be altered later through, for example, training.
 For example: http://psycnet.apa.org/journals/dev/31/1/43/ and http://psycnet.apa.org/index.cfm?fa=buy.optionToBuy&uid=2007-19851-006. Of course, not knowing the term or concept, they don’t literally feel “homosexual,” but they have experiences that differ from heterosexual kids in a way that is continuous with their adult understanding of the term.
 http://www.telegraph.co.uk/science/science-news/10637532/Being-homosexual-is-only-partly-due-to-gay-gene-research-finds.html It’s my opinion that they are overstating the results.
 http://pediatrics.aappublications.org/content/113/6/1827.long. See the section titled “Etiology and Prevalence,” especially the paragraph starting with, “A variety of theories about the influences on sexual orientation have been proposed.”
Also, see: http://www.rcpsych.ac.uk/workinpsychiatry/specialinterestgroups/gaylesbian/submissiontothecofe/psychiatryandlgbpeople.aspx#wellbeing. “Despite almost a century of psychoanalytic and psychological speculation, there is no substantive evidence to support the suggestion that the nature of parenting or early childhood experiences have any role in the formation of a person’s fundamental heterosexual or homosexual orientation (Bell and Weinberg, 1978).
“It would appear that sexual orientation is biological in nature, determined by genetic factors (Mustanski et al, 2005) and/or the early uterine environment (Blanchard et al. 2006). Sexual orientation is therefore not a choice, though sexual behaviour clearly is.”
 This section and the paragraph preceding it is a summary of decades of study about members of highly diverse groups throughout the world.