“Trick or treat!”
For those who live outside the shouting distance of the US media, the modern tradition of trick-or-treating consists of costumed children going door-to-door in residential areas, saying “trick or treat!” (which is a phrase that implies they’ll pull a prank if you don’t give them candy), and presenting you with bag or bucket in which to deposit said candy.
There are some variations, of course: when I lived in places where it was either too rural to walk around, or else considered to dangerous to go outside, people would set up little candy stalls in local businesses, the mall, or the park so all the parents could keep an eye on things while the kids ran around. Certain versions of Christianity take issue with the ghoulish theme of the holiday, and often have competing harvest festivals. (These are uniformly Protestant churches.) Those who don’t wish to be bothered will keep their porch lights off, notifying any neighbor kids not to knock. Finally, older kids and many teens tend to be more than willing to skip the treat part in favor of playing pranks either on houses or each other.
It’s a fairly complicated little social ritual, all things considered- and its history is just as messy. Unlike Jack-o’-Lanterns, which followed a pretty direct line from one tradition to another, trick-or-treating has several possible ancestors:
And all of that before you even get to America! (source) All of this illustrates that for the British Isles, there is a well-established tradition of people- especially the young or the poor- making the rounds of their neighborhood during a special time of year. However, it also illustrates that this behavior goes in and out of fashion; very few of these activities are directly related to each other.
If you’re creating a fictional universe, or a complicated game system, you might be interested in how this ties in with things like a gift economy. Basically, these traditions have in common the fact that food or wealth is put out into the community for anyone and/or everyone to take, without any social stigma of “being a moocher” attached. If you’re having trouble catching up newer players with the older players’ power creep in a long-running larp, events like this are a great way to inject a little money or power into their hands.
Turning back home, though- American culture for the last couple of centuries has been heavily influenced by the British Isles; it was the English colonies who formed the government that would consolidate the center strip of the continent under one rule, and waves of immigration from England and Ireland continued into the late 1800s, only reinforcing the proliferation of that culture here. Nevertheless, trick-or-treating in it’s modern form is only about 70 years old.
According to History.com’s excellent article on the subject, by the 1920s, pranks were the amusement of choice for American youth- a pattern which only got worse during the Great Depression. A night of mischief with tinges of class conflict throughout its history was probably always going to be a troublesome holiday when people were starving. However, people got tired of it, and began organizing cheerful, non-destructive trick-or-treating events. (I’d love to find more details on that transition).
In any case, that was just in time for World War II to break out, and sugar rationing to kick in. Thus, it wasn’t until the war ended, the Baby Boom kicked in, and suburbs became dramatically more common that the perfect storm of trick-or-treating began. Candy companies started advertising, and another great American tradition was born!
Note: There is a weird pattern in the US of treating pretty much anything advertisers invented in the 1950s as a Great American Tradition. For example.