This is actually an empirical question, and I'd bet there's empirical data on it. Without having seen the empirical data, my a priori hypothesis would be that homophobia (or more generally opposition to homosexuality) is strongly and positively correlated with religiosity.
But as I said, this is not a matter of opinion but one of evidence.
I would argue that it has more to do with cultural norms in a society. There are lots of prejudices that have nothing to do with homosexuality and/or religion. Religion is simply used to justify homophobia in many cases.