How do you know this? Are you saying the root cause of all homophobia is because of religion? Or are you just saying that it is the root cause of homophobia among Muslims? There is no homophobia among atheists?
Unreasonable prejudice against harmless behaviour would exist with or without religion. There was a time when left-handed schoolchildren were discouraged from writing with their left hand, and I don't recall proscriptions against left-handedness in the Bible (although possibly there are: it's really long, boring, and inconsistent).
But nobody ever threw a left-hander off a building, or hanged one, or stoned one, or sent them to prison with hard labour
just because they were left-handed. Religion is not necessary for homophobia, but it does seem to be necessary for the kind of homophobia that would lead to governments, mobs, and individuals to kill homosexuals just for being homosexuals.
Children have to be taught hate, and nothing teaches hate better than religion. Some atheists might hate homosexuals as a remainder of a religious culture, or they have some incoherent concept about it being 'unnatural', or some other nonsense reason, but if none of the holy books had described homosexuality as an affront to God, and if none of the holy books had prescribed death for it, no, Omar Mateen would not have been taught to hate himself and all homosexuals so much that he decided to kill 50 of us.