Traditions of Dressing in Costume
It was believed that until midnight on the eve of All Saint's Day, evil spirits would roam around frightening and wreaking havoc on villagers and such. Then, at midnight, they would be driven back to whatever dark places they had come from because All Saint's Day would have begun..
So people dressed up as scary creatures / ghouls / etc. with the idea that if the real ones saw them they would be fooled and leave them be. The idea was that ghosts / ghouls / scary nasties don't go around scaring each other - that's no fun - so if you looked like one of them you would be relatively safe from their antics.