Gotta Love The Pumpkin Guy!
In the past, the word "jack-o-lantern" was used to describe the mysterious and inexplicable floating light seen at night, usually in swampy areas. In the US they were known as "will-o-the-wisp", "corpse light" in England, "witch fire" in Africa, and "fox fire" in Ireland.
According to folk legend, having been turned away from both, heaven and hell, the jack-o-lantern light is a soul that is forced to wander the earth forever. It's dangerous to see one, because they can force humans to blindly follow them to their deaths or disappearance.
There is an Irish folktale that provides a good background for the origin of the name. There was a man named Jack who was hated by most of the villagers for his drunkeness and terrible attitude. He was drinking one night when the devil came to claim his soul, however he was able to convince him to have one last drink with him before going to Hell. After they finished drinking, Jack explained to the devil that he did not have the money to pay for them and quite cunningly convinced the devil to change himself into a sixpence and then to change himself back after paying. The devil agreed, but Jack picked up the devil's coined self and placed him into his coin bag, which had the shape of the cross on it. The cross made the devil powerless and therefore could not escape. When Jack died, Heaven did not let him in because he was far too greedy during his life on Earth. Hell also denied him because of his trickery, which infuriated Satan. Jack was eating a turnip when the devil threw him a lit coal. He picked up the coal and placed it into the turnip, creating a lantern for him to use as he wandered the earth. Therefore, jack-o-lantern means "Jack of the Lantern."
The custom of carving a pumpkin into a jack-o-lantern is a thousand year old custom from Ireland. People would hallow out turnips, carve simple and sometimes scary faces, and used them as lanterns to light the roads for Halloween travelers. They were also used to scare away evil ghosts.