It’s not like there’s one single answer. Such answers as there are will come from research. For some homosexuals, it’s environmental. For some, it might be a choice. For others, it may be biological. That doesn’t necessarily mean that there is a “gay gene.”
A study on identical twins determined homosexuality does not originate from a human’s biology.