The names will-o'-the-wisp and jack-o'-lantern are explained in etiological folk-tales, recorded in many variant forms in Ireland, Scotland, England, Wales, Appalachia, and Newfoundland.
An Irish version of the tale has a ne'er-do-well named Drunk Jack or Stingy Jack who makes a deal with the Devil, offering up his soul in exchange for payment of his pub tab.