There are many legends and traditions about the Jack-o-lantern. It wasn't until 1866 that carving the pumpkin at Halloween became a specific tradition. Before the Irish immigrants came to America, they would carve turnips at Samhain and place them in there doorways or windows.
One legend goes that there was lazy and shrewd farmer named Stingy Jack who was being chased by some villagers that he had stolen from. While he was running away from the mob he met the Devil. The Devil told Jack that it was time for him to die. Jack being a very clever and shrewd man, got the Devil to agreed to change himself into a coin, with which he would pay the villagers for the stolen goods then the Devil could change back and chase the Christian villagers or they would fight amongst each other thinking one of them stole the coin. The Devil liked the idea very much and done just that. So as the coin the Devil jumped into Jack's wallet. While in Jack's wallet the Devil noticed he was next to a cross which Jack had also stolen from the village. Jack closed his wallet and then the cross stripped the Devil of his powers, so the Devil was trapped.
Jack only let the Devil out if he agreed not to take his soul, which the Devil did.
Life went on as it does for everyone then one day Jack finally died.
Since Jack lived a life of sin by stealing, being shrewd and wicked he wasn't alllowed to go to heaven. Jack went to hell and the devil wouldn't let him in hell because the Devil did promise not to take Jack's soul. Jack had no where to go. He wandered the Earth in darkness. So Jack asked for some light, the devil gave Jack an ember from the flames of hell, which would never go out. Jack carved out a turnip and placed the ember in it. Jack now roams the Earth until he finds a resting place.
There are many versions to this legend.
In one story, Jack was a black smith who loved his drinking. He was in a pub one night when the devil showed up to take his soul. Jack convinced the Devil to turn into a coin so he could pay for the drink. Again, the Devil agreed to do so. Again, the Devil was stripped of his powers because Jack had a cross in his pocket.
Jack finally let the Devil go if he promises not to take his soul for 10 years.
Well 10 years came about and the Devil came calling to Jack again for his soul. This time Jack convinced the devil to climb an apple tree, which the Devil did. When the Devil got into the tree, Jack placed crosses around the base of the tree ( or he carved crosses at the base of the tree ) and the devil couldn't get down. Jack promised to let the Devil down if he promise to not take his soul. Of course, the Devil promised not to take his soul.
In this story as well as the other ones, Jack finally dies and he is refused into heaven and into hell. He travels the Earth with an ember from hell in a turnip.
Some versions says that God help Jack trick the Devil and even gave Jack a turnip to carry his ember.
In another version, the Grim Reaper agrees to give Jack eternal life if Jack gives him his head to carry back to hell with him. The Grim Reaper agrees and takes Jack's head then places a carved pumpkin in place of his missing head.
So this Halloween/Samhain, when you gather the children and adults together to crave pumpkins tell them the story of the Jack-O-Lantern.