Halloween began with the Celtic festival of Samhain. It was a celebration to welcome the harvest at the end of summer. People would light bonfires and wear costumes to ward off ghosts.
Carving pumpkins started in Ireland where they originally used turnips. The tradition started because of a legend about a man named Stingy Jack who repeatedly trapped the Devil and only let him go on the condition that Jack would never go to Hell. When Jack died, he learned Heaven did not want his soul either, so he wandered the Earth as a ghost for eternity. The Devil gave Jack a burning lump of coal in a carved-out turnip to light his way. People began carving their own turnips to scare away evil spirits.
It was believed that Samhain was a time when spirits walked the Earth. The Celts began wearing disguises so they would not be mistaken for spirits.
Trick-or-treating may have started with the Celtic tradition of leaving out food to appease the spirits traveling the Earth. Another possibility is the German tradition of belsnickeling where children would dress in costume and call on neighbors to see if they could guess who they were. The children were rewarded with treats if no one could identify them.
The colors of black and orange come from Samhain. Black represents the death of summer, and orange represents the harvest season.
Bonfires were lit to light the way for souls seeking the afterlife.