Several studies have found correlations between same-sex sexual preferences and environmental conditions. In this case the “environment” can be the uterine environment, and refer to conditions during fetal development, or the environment can refer to conditions after birth.
The literature on post-birth experiences, and their impacts on sexual orientation, is challenging for many reasons, but largely because it is so difficult to disentangle the impact of a tolerant environment on a homosexual’s inclination to express their homosexuality. For example, there has been work suggesting that children of gay parents are more likely to grow up expressing same-sex sexual preferences. Is this because growing up in a gay family actually influences an individual’s sexuality, or because a family that is accepting of homosexuality creates a safe space for a homosexual or bisexual individual to express their sexuality?
Similarly, work in Denmark has shown that growing up in an urban environment is associated with the choice to marry a person of the same sex later in life. Diverse metropolitan areas are typically associated with greater tolerance towards gays and lesbians, so is it simply that this tolerance supports the expression of an existing characteristic, or is there something else about cities that promotes homosexuality? A summary from the Danish study includes the following statements: “For men, homosexual marriage was associated with having older mothers, divorced parents, absent fathers, and being the youngest child. For women, maternal death during adolescence and being the only or youngest child or the only girl in the family increased the likelihood of homosexual marriage.” 
Somewhat more compelling is the work on the prenatal environment and homosexuality. According to many of these studies, differential exposure to prenatal hormones, specifically testosterone, influences sexuality later in life.
Several studies have found evidence, through the development of certain body parts (e.g., fingers, ears) that lesbians were exposed to more testosterone in utero than were straight women. For example, finger (or “digit”) lengths, especially the ratio between the second (2D) and fourth (4D) fingers, seems to vary as a function of exposure to testosterone in the womb. The result is that, on average, the 2D:4D ratio is larger in women than men. Note that these differences are rarely noticeable without doing precise measurements of an individual’s finger lengths.
Check out the data represented in the following figure. 
Before we continue, consider the data represented in the following two figures.  What do they mean?
- Frisch, M., Hviid, A., Frisch, M. & Hviid, A. Childhood Family Correlates of Heterosexual and Homosexual Marriages : A National Cohort Study of Two Million Danes Childhood Family Correlates of Heterosexual and Homosexual Marriages : A National Cohort Study of Two Million Danes. (2006). doi:10.1007/s10508-006-9062-2 ↵
- from: Williams, T. J. et al. Finger-length ratios and sexual orientation. 404, 455–456 (2000). ↵
- from review of data in: Blanchard, R., Dickey, R. & Klassen, P. The relation of birth order to sexual orientation in men and women. (1998). doi:10.1017/S0021932098005112 ↵