Excuse this (short) monologue...
One of the important parts of science fiction is a certain imaginative distance: from our own era, country, class, political state-of-play, and so on. Of course we will be motivated by today's anxieties and longings - we can't jump over our own shadows. But it helps to be aware of the specifics of the here and now.
Sexuality is a good example of this. Homosexuality is now undergoing a slow transformation: from stigma to toleration to normalisation. This is uneven, unpredictable and often painful, but it is happening. And it seems like a radical, very modern thing.
But
scholars suggest that homosexual unions existed in sixteenth-century France, and the ancient Greeks were no strangers to homosexuality. Plato's - otherwise very conservative - philosophy included the idea that love of another man (typically a youth) can inspire chaste love of truth. What we see as radical and progressive now was actually quite common in years past. (And as commonly attacked, e.g by conservative Christians.)
(The same can be said for the so-called 'traditional family', which is actually a very modern idea.)
The best science fiction is informed by this. It's a speculative vision of the future, enriched by a good grasp of the past. It allows for a better idea of the diversity and changeability of human existence.
In this light, there certainly ought to be homosexuals in Star Trek. But their status, identities, politics and the like are up for grabs. We might see homosexuals who reduce themselves to their sexuality, and are mocked or celebrated because of it. We might see homosexuals discriminating against bisexuals. We might see homosexuals who think the label 'homosexual' is "so twentieth century", and stress the twenty-fourth century teachings of T'Shem on pan-sexuality.
In any case, I'm fairly certain that Star Trek on television hasn't explored this very much at all, and has remained very much bound within its own time and place.