Transgenders would definitely not be as shunned or hated, if it was not about religion. Though it is quite surprising that most religions do not spew hatred against transgenders themselves. However, the way people tend to perceive the holy books and form their own variations of understanding, results in an overall hatred against anyone who is indifferent.
Transgenders would definitely be more accepted if people were rather open minded and were taught to accept indifferent individuals the same. This lack of acceptance for outsiders, that which many religions seem to encourage, is the prime cause of why transgenders are hated and shunned.