Here is the response most homosexuals give to this claim, i.e.
Evolution doesn't explain homosexuality. Traits evolve due to greater reproductive success, and homosexuals aren't big on reproduction. Although homosexuality probably has a genetic component, much of its cause, perhaps most of it, appears to be non-genetic [Kendler et al., 2000; Kirk et al., 2000; Haynes, 1995]. To the extent it is not genetic, selection would not affect it.
Homosexuals still have children. Sexual orientation is not an either-or trait, but exists as a continuum [Haynes, 1995]. Those with some heterosexual orientation can still contribute homosexual genes (to the extent it is genetic; see above). And even the most extreme homosexuals sometimes have children.
The most extreme heterosexuals may have homosexual tendencies, too. Homophobic male heterosexuals showed more arousal to homosexual images than did non-homophobic heterosexuals [Adams et al., 1996]. Societal condemnation of homosexuality may contribute to its genes being propogated.
Genes for homosexuality could be beneficial on the whole. In bonobo chimpanzees, homosexual interactions are a form of social cement. It is possible that homosexuality evolved to serve social functions in humans, too [Kirkpatrick et al., 2000]. After all, social cohesion is still a main function of sex in humans.
The genetic etiology of homosexuality may come from a collection of traits that, expressed strongly and in concert, result in homosexuality; expressed less strongly or without supporting traits, these traits contribute to the robust nature of our species. The traits exist because, on the whole, they make us better survival machines; the fact that they sometimes combine to create individuals who will not reproduce is no more an indictment of evolution than any of the myriad other genetic conditions that prevent individuals from reproducing.
Genes for homosexuality could be spread through kin selection, if the homosexuals care for their siblings' offspring. However, this explanation is unlikely [Kirkpatrick et al., 2000].