Picture by Jovan Ukropina
You probably already know how the origins of the Jack O' Lantern are associated with an Irish blacksmith named Jack, known as "Stingy Jack" due to his greed. When he died, he was refused entrance to either Heaven or Hell, instead being forced to wander eternally between them. There are a few different explanations as to why the Devil wouldn't let him into Hell, but the most common seems to be that Jack had tricked and trapped Satan on an earlier occasion. I've seen stories about people being too bad for Heaven and too good for Hell in other places as well (I think Ibsen used it in Peer Gynt), which certainly isn't in line with the modern fundamentalist Christian idea that everyone goes to Hell by default. Then again, these fundamentalists also tend to believe that the origins of Halloween and the Jack O' Lantern have to do with human sacrifice among the Druids. I'll get back to that idea later, but I should really finish the story of Jack first, shouldn't I? Although the Devil won't let him into Hell, he gives Jack an ember to light his way in the darkness, and Jack carries this around inside a turnip. When the Irish brought the tradition of making lanterns out of vegetables to North America, they began using pumpkins instead, as they were better suited to the task. It seems that carved vegetables were associated with the harvest season for some time, but it wasn't until the nineteenth century that they were specifically linked to Halloween.
Turning our attention back to the fundamentalists, our old friend Jack Chick paints the rather absurd notion that Jack O' Lanterns were left by the Druids in exchange for human sacrifices, which in turn means Halloween is of the Devil. There is some evidence that the Celts practiced human sacrifice (although the main sources for this are from their enemies, the Romans), but I don't know of any indication outside fundamentalist propaganda that it was associated with Samhain. The autumnal festival was about the harvest and the slaughter of cattle, not children. It was also the beginning of the dark half of the Celtic calendar, and the time when the boundaries between the worlds of the living and the dead break down. (That kind of seems to me like it would be the WORST time to practice human sacrifice, as it would just result in more ghosts to terrorize the land.) Bonfires and costumes were used to drive off or placate the invading spirits.
Picture by Marie Jamieson
Trick-or-treating, of course, started with the tradition of Druids going door to door to kidnap children for sacrifices. No, wait, that's another Chick idea. It's actually more likely to derive from a practice originally associated not with Halloween or Samhain, but with Christmas. During the Middle Ages, Christmas was a time when peasants would beg for food at the homes of wealthy lords. The beggars could get quite rowdy and violent, which is a significant part of why Oliver Cromwell banned the celebration of Christmas. It wasn't until later that Christmas evolved into a much calmer holiday, and the door-to-door rowdiness was transferred over to Halloween. The Wikipedia article on trick-or-treating states that there was also a similar practice known as "souling," when the poor would go out on All Saints' Day and beg for food door-to-door in exchange for prayers. The article also says, however, that there's no evidence that souling was ever practiced in North America.