A NY Times article on the spread of Halloween culture in Britain, includes this explanation
Britain’s adoption of the American holiday is perhaps not a surprise. Halloween was originally an ancient Celtic celebration in Ireland and Scotland, exported to the United States by immigrants. The Irish and Scots point to older Halloween traditions. The jack-o’-lantern was originally a squash, not a pumpkin; apple-bobbing began as a matchmaking ritual; and people wore costumes to ward off evil spirits.
A bit confusing to those of us who know that pumpkins are squash. What they mean to say, I think, is that before the pumpkin and its squashy compatriots migrated to Europe in the backwash of the conquistadores, the jack o’lantern was a turnip, hence the famous quip of Winston Churchill on seeing Stanley Baldwin in his dotage “the light is at last out of that old turnip.”
(I did a Google search to check the provenance of this quote. Amusingly, two web sites that mention it give diametrically opposed contexts. The website winstonchurchill.org cites a book Irrepressible Churchill for placing the anecdote as a devastating barb in the Commons smoking room in 1937, shortly after the end of Baldwin’s active political career. Another website cites no source for making it a “fond” remark after Baldwin’s death, in 1947.)