Why do we carve pumpkins at Halloween?
People made lanterns to ward off evil spirits wandering the Earth on Halloween night. Originally, carved turnips were used as Samhain lanterns, but when Irish Catholics came to America, they started to use widely available pumpkins.
Why is it called a Jack-o'-Lantern?
According to legends, there once lived a man named Stingy Jack. He was a drunk and a manipulator who tricked the devil so many times, that after his death the devil left him on earth at night with nothing but single burning coal to light his path. Jack put the coal into the lantern carved from a turnip and continued to wander in the dark. That's how the Jack-o'-Lantern legend was born.
Flickering of the Halloween lanterns resembled the paranormal phenomenon called will-o'-the-wisp (or foolish fire). Will-o'-the-wisp was a strange light seen at night over the bogs. People believed either fairies or ghosts were trying to mislead travelers by conjuring the eerie glow. It was later explained that the light is a result of ignited gases from decomposing mulch.
After a while, Stingy Jack legend and the particular spelling of will-o'-the-wisp phenomenon merged together and became known as Jack-o'-Lantern.