I'll give my biblical response now to explain why according to the bible, it is okay to trick or treat and eat Halloween candy.
In 1 Corinthians 8 Paul answers the question if it is okay to eat food sacrificed to idols. That parallels greatly with candy from Halloween trick or treating, except, even worse, IMO. You can't get any more closer to pagan ties than food sacrificed to idols.
In verse 4 he says: "So then, about eating food sacrificed to idols: We know that an idol is nothing at all in the world and that there is no God but one. For even if there are so called gods, whether in heaven or on earth (as indeed there are many "gods" and many "lords")..."
Here Paul is saying that there is only one true God and many man-made imaginary gods.
Look at verse 7, "But not everyone knows this. Some people are still so accustomed to idols that when they eat such food they think of it as having been sacrificed to an idol, and since their conscience is weak, it is defiled. But food does not bring us near to God; we are no worse if we do not eat, and no better if we do."
Here Paul says that eating food sacrificed to idols is not a sin. There is no harm in it, but no benefit to it either. Here is the key: if we simply pray over our food (or Halloween candy) in the name of Jesus, then it is blessed regardless of its original pagan origins. But the one who's conscience is weak, to them it is a sin if they eat because they believe that they are doing something wrong.
But he warns in verse 9, "Be careful, however, that the exercise of your freedom does not become a stumbling block to the weak. For if anyone with a weak conscience sees you who have this knowledge eating in an idol's temple, won't he be encouraged to eat what has been sacrificed to idols (against his or her conscience--I'm adding for clarity). "So this weak brother, for whom Christ died is destroyed by your knowledge. When you sin against your brother in this way and wound their weak conscience, you sin against Christ."
Here he is saying that we have freedom in Christ to do these things, but if it will somehow make another Christian uneasy to see you doing it then it is not right to do it. So neither are we to make someone do it who is uneasy with the idea because they are not aware of our freedom in Christ.