Mythical and Spiritual Connections
Facts:
Religion and superstition (not entirely incompatible) were both very important indeed to people of medieval times, much more so than to most "westerners" today. People looked to God or gods and other supernatural beings for answers to fundamental questions and for help and especially protection.
Suppositions & Logical steps:
What could be better protection for your place of worship than to put images of supernatural beings on it, although ones on your side naturally. Images of God or the Holy Spirit, perhaps, but these were frowned upon and anyway who knew what God really looked like?. Images of Christ might be better, but then Christ was also a man and he was already inside the house of God. Images of the old gods might work, but of course that would be heresy. It's a small logical step to the use of gargoyles as protectors and the myths about their abilities.
The Gargoyle Myth and how gargoyles drive off evil:
I've put comments in brackets().
They can stand guard and ward off unwanted spirits and other creatures. If they're hideous and frightening they can scare off all sorts of things. They come alive at night when everyone's asleep (and you can't see them to prove that they don't) so they can protect you when you're vulnerable. Better still, the ones with wings can fly round the whole area and cover the village or town as well as the church. (And if someone does see something, who's to say whether it was just a bat or one of the gargoyles on the wing?) They return to their places when the sun comes up (and no-one can prove that they weren't out and about, and no-one respectable who rises and sets with the sun is going to be mistaken by them for an enemy and be dealt with). If you want to see an example of the kind of gargoyle that fits the myth, look at the ones on Woburn church.
A comment on the tame ones: This doesn't really explain the rather tame looking ones. These could possibly be explained by the architectural trend towards more ornamentation and decoration. I think many of the slightly grotesque ones can be explained by the myth if you note that some concepts were simpler for most people in medieval times, for example, pulling your lips wide apart in a grimace using your hands and trying to look scary ("gurning") was a terrific joke. Presumably it was also more scary than now, given that any kind of deformity could be worryingly reminiscent of deformity from incurable diseases or unexplained acts of God or devil, both things to be feared. Some of them have just got to be jokes though.
Other possibilities - a warning to the populace:
An appealing idea for explaining medieval gargoyles, is as a reminder or warning to the populace of the evil all around outside and the safe sanctuary inside the church. Evil takes many forms, from women carrying the devil on their backs (very symbolic, very unenlightened and non-PC) to bug eyed human faces twisted into monstrocities, to demons, dangerous beasts, hideous human horrors, and hairy men who have descended terribly into the brutal and frightening level of the beast. Better the beauty and serenity inside, come on in and forget the trials of the world outside for a while and pray for your soul and your salvation from the horrors shown outside.
Of course it could be as much a case of the gargoyles saying (metaphorically) "Hey you Jimmy! Yes you! Who do you think I mean? Watch yer step, laddie, we've got our eye on you. One step out of line and you've had it, you're meat, with our teeth in it."
Other possibilities - insurance policy against building collapse:
This bizarre proposed explanation is really protection against evil. Here's a snippet from the soc.history.medieval newsgroup postings from 1997, quoting a book "Structures (or why things don't fall down)", Author: J.E.Gordon.
---Quote---
My copy is an old pelican edition in paperback published in 1978 & has no ISBN on what's left of it. I thorougly recommend this book as a minimal maths exploration of architecture which is full of fascinating anecdotes.
As for the gargoyles, apparently the builders believed that they scared away the demons who would otherwide push the walls down. If they built one without gargoyles it fell over. There you are! It actually is all to do with how the forces act within the structure, & keeping the direction of the thrust within the wall by loading the top.
---UnQuote---
http://www.stratis.demon.co.uk/gargoyles/gg-ety-hist-myth.htm