Costumes and trick-or-treating
The tradition of dressing in costumes and trick-or-treating may go back to the practice of "mumming" and "guising," in which people would disguise themselves and go door-to-door, asking for food, Santino said. Early costumes were usually disguises, often woven out of straw, he said, and sometimes people wore costumes to perform in plays or skits.
The practice may also be related to the medieval custom of "souling" in Britain and Ireland, when poor people would knock on doors on Hallowmas (Nov. 1), asking for food in exchange for prayers for the dead.
Trick-or-treating didn't start in the United States until World War II, but American kids were known to go out on Thanksgiving and ask for food — a practice known as Thanksgiving begging, Santino said.
"Mass solicitation rituals are pretty common, and are usually associated with winter holidays," Santino said. While one tradition didn't necessarily cause the others, they were "similar and parallel," he said.
Tricks and games
These days, the "trick" part of the phrase "trick or treat" is mostly an empty threat, but pranks have long been a part of the holiday.
By the late 1800s, the tradition of playing tricks on Halloween was well established. In the United States and Canada, the pranks included tipping over outhouses, opening farmers' gates and egging houses. But by the 1920s and '30s, the celebrations more closely resembled an unruly block party, and the acts of vandalism got more serious.
Some people believe that because pranking was starting to get dangerous and out of hand, parents and town leaders began to encourage dressing up and trick-or-treating as a safe alternative to doing pranks, Santino said.
However, Halloween was as much a time for festivities and games as it was for playing tricks or asking for treats. Apples are associated with Halloween, both as a treat and in the game of bobbing for apples, a game that since the colonial era in America was used for fortune-telling. Legend has it that the first person to pluck an apple from the water-filled bucket without using his or her hands would be the first to marry, according to the book "Halloween and Commemorations of the Dead" (Chelsea House, 2009) by Roseanne Montillo.
Apples were also part of another form of marriage prophecy. According to legend, on Halloween (sometimes at the stroke of midnight), young women would peel an apple into one continuous strip and throw it over her shoulder. The apple skin would supposedly land in the shape of the first letter of her future husband's name.
Another Halloween ritual involved looking in a mirror at midnight by candlelight, for a future husband's face was said to appear. (A scary variation of this later became the "Bloody Mary" ritual familiar to many schoolgirls.) Like many such childhood games, it was likely done in fun, though at least some people took it seriously. [Why Do We Carve Pumpkins at Halloween?]