People have been carving jack-o-lanterns for hundreds of years. The tradition of carving jack-o-lanterns was brought to America by the Irish.
According to Irish mythology there was a man known as Stingy Jack who had tricked the Devil. One result of his trick was that the Devil could never claim his soul. When Stingy Jack finally died he found that he could not gain access to Heaven either. He found himself wondering in the darkness. The Devil gave him an ember directly from the fires of Hell to help hime see in the darkness. Stingy Jack hollowed out a turnip and placed the burning ember inside. Ever since that day Stingy Jack has roamed through the earth, trapped between Heaven and Hell.
The Irish people carved their jack-o-lanterns on All Hallow's Eve and placed candles within them to keep evil spirits and Stingy Jack away. Originally the jack-o-lantern was carved from turnips, potatoes, gourds, rutabagas and even beets. Irish immigrants found that pumpkins were much larger than turnips and much easier to be carved. Gradually the pumpkin became the fruit of choice for carving jack-o-lanterns.