Pastor Joseph Abrahamson has a running project of refuting the notion that Christian holidays derived from pagan festivals. You have got to read what he says about the history of Halloween.
He points out, for example, that since days were considered to begin when the sun goes down on the previous day, Halloween is the “eve” of All Hallows; that is, All Saints’ Day, one of the oldest Christian holidays that had no connections whatsoever with any pagan observances. So just as Christmas Eve is actually the beginning of Christmas day (so that it is quite legitimate to open presents on that day), Halloween is the beginning of All Saints’ Day.
Trick or Treating comes from the custom of beggars making the rounds for almsgiving, which was associated with All Saints’ Day as well as the other major Christian holidays: Christmas, Easter, and Pentecost.
Jack-o-Lanterns first showed up in America in the 1800s.
For more details about the origins of Halloween, read Pastor Abrahamson’s article: Hallowe’en: A short history.