It's not clear yet.
Genetic studies still have not conclusively identified markers that are specifically tied to determining sexual identity in men or women.
Some family studies seem to indicate inherited tendency in siblings for homosexuality
. Large twin studies in sweden don't support a single gene, single environmental variable that could select out homosexuality. It concludes many complex factors are responsible.