It's the prelude to All Saints Day and All Souls Day - Nov 1st and 2nd. A christian tradition (costumes, visiting houses for food) for centuries, but likely appropriated from pre-christian times. I believe the thinking was the souls of the dead hang around until this night, and they are guided on to the afterlife.
Wikipedia has this stuff...
http://en.wikipedia.org/wiki/Halloween
"It was traditionally believed that the souls of the departed wandered the earth until All Saints' Day, and All Hallows' Eve provided one last chance for the dead to gain vengeance on their enemies before moving to the next world. In order to avoid being recognized by any soul that might be seeking such vengeance, people would don masks or costumes to disguise their identities".[76] In the Middle Ages, churches displayed the relics of martyred saints and those parishes that were too poor to have relics let parishioners dress up as the saints instead,[77] a practice that some Christians continue in Halloween celebrations today.[78] folklorist Kingsley Palmer, in addition to others, has suggested that the carved jack-o'-lantern, a popular symbol of Halloween, originally represented the souls of the dead.