Alright, well the Celtics are as far back as we can go, uh, about 2,000 years ago or something like that, who lived in what is now Ireland, the United Kingdom, and northern France. For the Celtics, November 1st marked the end of summer and harvest and beginning of the dark, cold winter. The night before then was a symbol of that boundary between two worlds, or in other words when the living and the dead overlapped. Furthermore, the deceased would come back to life, cause havoc, destroy crops, and cause sickness, apparently. To add the icying on the cake, it was also perfect timing for Druids, or Celtic priests, to foretell prophecies of the future which were comforting in a time of darkness.
Later on, the church would mark November 2nd 'All Souls' Day.' A day to honor the dead but also a day to replace the Celtic festival of the dead. Celebration of 'All Souls Day' was celebrate similarily to the Celtic festival: bonfires, parades, dressing up in constumes, etc. The night before then began to be called All-hallows Eve, aka. Halloween.
The costumes? Well, wouldn't you know it. The Celts wore costumes during the event bonfires. These were usually animal heads or skins. The masks and costumes were for pleasing the evil spirits. The 'trick-or-treat?' Two ideas probably evolved into this. One was the modern way to play a game of what they did back then as 'fortune telling' in combination with taking the costumes door-to-door.
Read More at these Additional Resources: