All Hallows is a Christian ” replacement” for the old pagan festival of Samhain This was a time when the veil between the worlds ( the World of the Living and the World of the Dead) was said to become very thin. This made it the optimum time to communicate with the Spirit world and an ideal time for divination.
In pagan tradition it is believed that there are three Worlds and the we live on the Middle World, while the spirits of the dead live in the Lower World.( This is not the equivalent of Hell in Christian tradition with its connotations of evil and punishment of sinners).
It was believed that entry to the Lower World could be gained by humans or witches in a trance state guided by their power animals or familiars who would journey down to the Lower World through entrances in the ground such as caves.
It was realised that bats often exit from caves in significant numbers st dusk and it was believed that these creatures could carry messages from the Lower to the Middle World. Such a journey is easiest at Samhain, and so bats became inextricably liked to witches. Witches got a bad reputation with Christians and by association bats got a bad case of PR as well.
It is not just in Europe that this is believed, some Native American and Australian aboriginal group also consider the bat to be a messenger http://ravenari.deviantart.com/art/Bat-as-Totem-83667726