Image from the BBC Pumpkin Gallery
Irish legends tell us that the Jack O'Lantern was named after a neer-do-well named Stingy Jack who tricked the devil into paying for his drinks (or trapped him in a tree, or...well, there's quite a few devilish predicaments noted in folklore.)
They're all resolved when Old Scratch promises not to take Stingy Jack's soul. Jack, though, didn't quite cover all his bases. When Jack died, the devil, true to his word, let him pass by and journey toward the Pearly Gates.
St. Peter took one look at the Book, and informed Jack that he was at the wrong doorway. Jack reported to Lucifer, and found out the joke was on him; the Devil still refused to let him into his realm.
Unable to enter heaven or hell, Jack was compelled to walk the shadows of the earth for eternity. When he complained that he couldn't see, Old Nick tossed him a burning ember from Hades, guaranteed to never go out.
Jack scooped out a turnip (his favorite snack; he would steal one whenever he could, and always had one stuffed in his pocket) and to this day, it lights his way.
The Irish began to refer to his ghostly figure as "Jack of the Lantern," and then, simply "Jack O'Lantern."
And the ol' Jack O' Lantern would prove handy for all varieties of spooks, not just Stingy Jack. Irish lore claims that if a demon would encounter something as fiendish looking as itself, it would flee in terror. So the folk from the Emerald Isle would carve a gruesome countenance on a hollowed-out turnip and set it out on All Hallow's Eve to keep the roaming undead away.
The story and the use of a Jack O' Lantern crossed the Atlantic with the Irish Catholics of colonial Maryland, who soon discovered that a pumpkin was a heck of a lot easier to carve than a turnip, and that as an added bonus, the innards made a pretty tasty pie, too.
The tales and use of the Jack-O'-Lantern are at least two thousand years old.
The first were simple faces carved in hollowed turnips used as night lanterns. They were designed to both frighten away evil spirits and to guide and protect the living.
The symbolic protection provided by the Jack O' Lantern would carry over. Night watchmen in the mid-1600s were called Jack O' Lanterns, or the men with the lanterns, guarding the dark medieval cities and hamlets. The eerie connotation carried on, too - a Jack O' Lantern was another name for a will-o'-the-wisp, better known as ghost lights.
So hey, when you're carving out that split-toothed goblin with the triangular eyes, put a little soul and artistry into it - you're the latest link in a tradition that dates back millenniums.