Rappers and boy band members are the most likely types in pop music to be gay, usually closeted.
It sounds like an odd kinship: rappers try to project a persona of machismo, thug life, etc., while boy banders try to project a sensitive, non-threatening image. Rap targets more urban, lower-class, and less-white audiences, boy bands target suburban middle-class whites. Rap is a staple at night clubs, boy bands never are.
The strongest similarity between the two genres is the reliance on vocals rather than instrumentation. Boy banders sing, and rappers merely talk, but it's still all about vocals. Nobody plays an instrument, and they don't bother hiring session musicians either.
This seems to be another symptom of gay Peter Pan syndrome.
Playing an instrument requires a certain level of maturity -- not only the time necessary to practice and master it well enough to make a living from playing it, but from having the mindset of wanting to practice in order to improve. Small children are more trapped in the present, and are more apt to say "forget this, I hate this" and melt down if they aren't immediate experts.
Small children must be bossed around by parents into practicing an instrument. By the time they're adolescents, they pick up their own internal motivation to keep at it, assuming they're musically inclined to begin with.
Trapped in the "eww girls are yucky" stage of development, gays never develop that level of motivation to master an instrument (other than the skin flute). If they join a musical group, it will almost always be as a singer -- that comes naturally to children, and doesn't have to be learned and practiced just to get the basics down. Practicing singing is to refine native talent.
This leads to one of the great ironies of pop music history: the near absence of homos in disco. Disco instrumentation was the most diverse and complex in popular music since the Big Band era, so if you didn't play an instrument, you were out.
I checked Wikipedia's list of gay musicians with those whose entry mentions "disco" somewhere, and only two matched -- The Village People (obviously), and Sylvester. No surprise that they were more campy novelty acts than a serious band like Chic or KC and the Sunshine Band.
Like disco, heavy metal is oriented more toward mastery of instruments than vocals, and is also relatively fag-free, other than Rob Halford from Judas Priest, but then he's a singer. The only gay instrumentalist I could uncover is Roddy Bottum (real name), the keyboardist from Faith No More (more alterna-metal than heyday metal).
Hard rock only had Freddie Mercury from Queen, again a singer. Rock music in any of its forms has almost no homos in it.
Synth-pop and dance pop have lots of gay singers, although they're paired with hetero instrumentalists. New wave was more instrumental than vocal, and wasn't nearly as gay as synth-pop.
The mainstream view is that the descendants of disco were the synth-pop groups, but just like the name says, it was more like pop music with synthesizers. Disco's true inheritors were the new wavers, with Nile Rodgers from Chic passing the baton to John Taylor from Duran Duran. As in disco bands, it was common for there to be black and white members in a new wave band, but not so much in synth-pop groups.
Disco gets a bum rap, in no small part because of its popularity with gay audiences -- at least back then, not so much these days since gays are too slave-to-fashion to conserve what is good from the past. Whit Stillman tried to portray how normal and mainstream the New York disco crowd was, although I don't think he convinced anyone who was already committed to the view of disco as only for gays and gals.
The other source of its bad reputation is people only remembering "Y.M.C.A." and therefore thinking that half or more of the disco groups must have been gay. This little investigation shows how off-base that is, and provides a good reason why -- gays don't play instruments, and disco was one of the most heavily instrumental genres then or now.