Buddhism has three main branches: Theravada, the oldest form of Buddhism that emphasizes the monastic life; Mahayana Buddhism, a later form that includes Pure Land, Zen, Nichiren, and other sects; and Vajrayana, a unique form that arose in India and Tibet and is led by the Dalai Lama.
Though they share a common heritage, each of these branches has a somewhat different view of the way life should be lived in general and are thus treated separately in the article that follows.
Homosexuality in Buddhist Scriptures and Theravada Buddhism
Theravada Buddhism is most commonly found in Southeast Asia, and focuses on the original teachings of the Buddha. In Theravada Buddhism, there are two main ways of life: the life of the monk and the life of the lay person (i.e. ordinary person with a job, a family, a home, etc.)
Buddhist monks are expected to live lives of celibacy, meaning abstinence from any type of sex. There is no explicit rule prohibiting those with a homosexual orientation from monastic life.  However, in the Vinaya, the Buddha is recorded as opposing the ordination of those who openly expressed cross-gender features  or strong homosexual desires and actions . The Buddhist sacred texts do contain a great deal of instances of loving relationships between unmarried men, which some believe to have homoerotic overtones. No sexual contact is mentioned in these instances, however. 
Lay Buddhists (those who live outside the monastery) are expected to adhere to Five Precepts, the third of which is a vow "not to engage in sexual misconduct." But what is sexual misconduct? Right and wrong behavior in Buddhism is generally determined by considerations such as the following:
- Universalibility principle - "How would I like it if someone did this to me?"
- Consequences - Does the act cause harm and regret (in oneself or others) or benefit and joy?
- Utilitarian principle - Will the act help or harm the attainment of goals (ultimately spiritual liberation)?
- Intention - Is the act motivated by love, generosity and understanding?
"Sexual misconduct" has thus traditionally been interpreted to include actions like coercive sex, sexual harassment, child molestation and adultery. As Homosexuality is not explicitly mentioned in any of the Buddha's sayings recorded in the Pali Canon (Tripitaka), most interpreters have taken this to mean that homosexuality should be evaluated in the same way as heterosexuality, in accordance with the above principles.
A Buddhist author of an article on homosexuality concludes:
In the case of the lay man and woman where there is mutual consent, where adultery is not involved and where the sexual act is an expression of love, respect, loyalty and warmth, it would not be breaking the third Precept. And it is the same when the two people are of the same gender. Likewise promiscuity, license and the disregard for the feelings of others would make a sexual act unskillful whether it be heterosexual or homosexual. All the principles we would use to evaluate a heterosexual relationship we would also use to evaluate a homosexual one. In Buddhism we could say that it is not the object of one's sexual desire that determines whether a sexual act is unskillful or not, but rather the quality of the emotions and intentions involved. 
It is also worth noting that Buddhism does not traditionally place great value on procreation like many western religions. From the Buddhist viewpoint, being married with children is regarded as generally positive, but not compulsory (although social norms in various Buddhist countries often have different views). 
Despite all this, in practice, Theravada Buddhist countries are not terribly open to homosexual practice. This has much to do with cultural norms, as well as the notion of karma, which remains strong in countries such as Thailand. From this viewpoint, a person's characteristics and situations are a result of past sins or good deeds. Homosexuality and other alternative forms of sexuality are often seen as karmic punishments for heterosexual misconduct in a past life. Thus far, the gay rights movement has not had great success in Theravada Buddhist countries. 
Homosexuality in Vajrayana/Tibetan Buddhism
In a 1997 interview, the Dalai Lama (the leader of Tibetan Buddhism and a widely-respected spiritual figure) was asked about homosexuality. He did not offer any strong answer either way, but noted that all monks are expected to refrain from sex. For laypeople, he commented that the purpose of sex in general is for procreation, so homosexual acts do seem a bit unnatural. He said that sexual desires in themselves are natural, perhaps including homosexual desires, but that one should not try to increase those desires or indulge them without self-control. 
In a 1993 talk given in Seattle, the Dalai Lama said:
nature arranged male and female organs "in such a manner that is very suitable... Same-sex organs cannot manage well." But he stopped short of condemning homosexual relationships altogether, saying if two people agree to enter a relationship that is not sexually abusive, "then I don't know. It's difficult to say." 
The Dalai Lama was more specific in a meeting with Buddhist leaders and human rights activists in San Francisco in 1997, where he commented that all forms of sex other than penile-vaginal sex are prohibited for Buddhists, whether between heterosexuals or homosexuals. At a press conference the day before the meeting, he said, "From a Buddhist point of view, [gay sex] is generally considered sexual misconduct." But he did note that this rule is for Buddhists, and from society's viewpoint, homosexual relationships can be "of mutual benefit, enjoyable, and harmless." 
The Dalai Lama is well known for his activism for human rights, and this specifically includes equal rights for gays. According to an Office of Tibet spokeman, "His Holiness opposes violence and discrimination based on sexual orientation. He urges respect, tolerance, compassion, and the full recognition of human rights for all." 
- - A. L. De Silva, "Homosexuality and Theravada Buddhism." BuddhaNet's Magazine Articles, accessed 2005.
- Peter A. Jackson, "Thai Buddhist accounts of male homosexuality and AIDS in the 1980s ." Australian Journal of Anthropology, December 1995.
- Kerry Trembath, "Buddhism and Homosexuality." Enabling.org, accessed 2005.
- "On Homosexuality and Sex in General." Interview with the Dalai Lama, World Tibet Network News, Aug. 27, 1997.
- "A Lesson on Life, Happiness." Dalai Lama's speech to Seattle crowd, World Tibet Network News, Jul. 1, 1993.
- Dennis Conkin, "Dalai Lama urges 'respect, compassion, and full human rights for all,' including gays." Bay Area Reporter, San Francisco, Jun. 19, 1997.
- Mettanando Bhikkhu, "Will Buddhists allow gay marriage?" Buddhist View International, Jul. 25, 2005.