The History of the Jack o'lantern comes from the Irish legend of Stingy Jack.
Stingy Jack was an Irish man who was- obviously by the name- very stingy. The story has it that one night Jack and the Devil went out for drinks. When it came time to pay, Jack being the man he was, did not want to pay. He told the Devil he should turn into a coin and he would pay with him. The devil did it but Jack just put the coin into his pocket. He put the coin next to a cross which prevented the devil from changing back into himself. Jack told the devil that he would let him out if he promised not to punish him for his wrong doings. The devil agreed, but a similar incident happened a year later. Jack asked the devil to climb a tree to get an apple. The devil did as he was asked, but Jack carved a cross into the tree so the devil could not get down. He told the devil that he would let him down if he left him alone for ten years. The devil once again agreed. When Jack died the devil kept his word and when Jack went to heaven, God refused to take him because of the things he had done. Jack was forced to walk in the dark for eternity with only a single carved lantern as his guiding light.
Jack-o-lanterns originally were made from beets, potatoes, and turnips. The name comes from Jack of the Lantern but then was shortened. When they were finally brought to america, they found out that pumpkins were the perfect fruit for carving.