The custom of carving the pumpkin, is based on, an old Irish myth, the use of the miserable and the naughty Jack. The story tells us, that Jack and the devil met one night and were drinking. Jack wasn't want to pay for his drink and persuaded the devil to make him a coin so they could pay for their drinks. The devil was transformed into coin and Jack instead of paying he put it in his pocket, close in his cross and the devil couln't returned back to his shape again. After much pleading and crying, however, Jack decided to set him free as long as the devil promised him that he would not bother him for a year, nor would he claim his soul when he died.
So time passed and the devil reappeared while Jack was trying to cut a fruit from a tree. So he asked the devil to climb the tree and cut a fruit for him. The devil ascended and Jack immediately carved a cross in the bark of the tree. So the devil was trapped. He could not get down. So he begged Jack to release him and promised not to bother him again for ten whole years. So, Jack set him free.
Several years passed and Jack died. He went to heaven but God didn't accept him, as Jack was a wicked and miserable man. So he sent him to hell. But also the devil didn't want him there and reminded him of the promise he had made some years earlier. So he told Jack to leave. But Jack asked him, "How am I going to leave?" It is dark outside. "
Then the devil took a burning charcoal and gave it to him to walk through the night. Jack then took out a radish (which he always carried with him as it was one of his favorite foods), he carved it and inside he put the charcoal. Since then he wanders in the world not being able to find a place to rest his soul.
So, every Halloween on October 31st, the Irish people, carve radishes, potatoes, pumpkins, put inside them a candle and place them near windows so as to keep away evil spirits and especially the spirit of the stingy and wicked Jack.