On October 31st of each year, the western world celebrates Halloween. Halloween’s origins date back to over 2,000 years ago with the Celts, who lived mostly in the area that is now Ireland, the United Kingdom and northern France. On the night of October 31st, the Celts would celebrate what is called Samhain because they believed that it was on this day that the ghosts of the dead returned to earth. Their traditions included lighting bonfires and wearing costumes to ward off ghosts.
On May 13, 609 A.D., Pope Boniface IV dedicated the Pantheon in Rome in honor of all Christian martyrs, and the Catholic feast of All Martyrs Day was established in the Western church. Later on, in the eighth century, Pope Gregory III expanded the All Martyrs Day festival to include all saints as well and moved the day of observance to November 1st. Soon, All Saints Day incorporated some of the traditions of Samhain. The All Saints’ Day celebration was also called All-Hallows. And the night of October 31st, which was also the night before All-Hallows, began to be called All-Hallows Eve and, eventually, came to be known as Halloween.
In America, Halloween was celebrated to a limited degree until the second half of the 19th century when millions of Irish migrated to America to flee the Irish Potato Famine and ended up helping to popularize the holiday nationally. Americans also borrowed from European traditions and began dressing up in costumes and going house to house asking for food or money. This is a practice that eventually came to be known as “trick-or-treating.” The tradition of trick-or-treating was a relatively inexpensive way for everyone in the community to share the Halloween celebration. Families in the community could prevent tricks from being played on them by offering children in the neighborhood small treats. Over time, Halloween evolved into a day that included not just trick-or-treating and donning costumes but other activities like carving jack-o-lanterns and festive parties.
Summarized from the following source: http://www.history.com/topics/halloween/history-of-halloween