Like all things in Buddhism, it depends on the context of this question. Foremost is the meaning of celebrate. If celebration means participating in wild party, lotsa booze and unskillful actions like sex orgies without adequate protection. Then perhaps the answer would be no.
As you can see, I am not going into the religious context or cultural background of Halloween. Instead, let us examine the activities nowadays and then decide whether those activities are skillful and meritorious. (Aka. Good karma)
Next, let us examine dressing up in costume. That is one of the highlight of Halloween, isn’t it? Again, there is no straight answer and it depends on context. In Buddhism, being reborn in the ghostly realm is considered a misfortune. This is because of the sufferings there. In this context, it is unwise to train our mind to embrace or celebrate it. Therefore, pretending to be a ghost or monster or undead (zombies) while feeling happy about it doesn’t make sense for a Buddhist.
But like everything else in Buddhism, we want to look at the context. In Mahayana sutra such as the lotus sutra- chapter 25, A Bodhisattva assumes different body in order to reach out to different types of beings, so that the Bodhisattva can teach them the Dharma.
If they need a heavenly being, a dragon, a yaksha, a gandharva, an asura, a garuda, a kimnara, a mahoraga, a human or a nonhuman being to be saved, immediately he becomes all of these beings and preaches the Dharma for them.
In this context, it is more about helping others. If we are overly uptight in our Buddhist practice, up to the point of intolerance, then we may create animosity. From this perspective, a Buddhist will practice skillful means. Instead of costume that celebrate violence (pretending to be a serial killer) or celebrate lower realms, a Buddhist might want to dress up and celebrate virtue? Perhaps our costume may create a dialogue opportunity for us to share the Dharma?
Trick or treating sounds like a threat to me and I don’t think that is an appropriate way to educate the children? Of course, nobody really teaches their child to wreak their neighbor’s porch for not receiving any candies. You don’t right?
The giving of sweats and candies seems like a form of charity? That cannot be bad, right? Teaching a child to ask politely or be thankful after getting candies can be meaningful, I think.
I guess it all boils down to 3 simple rules.
Are our deeds, speech and thoughts driven by wisdom, so that they help reduce craving, aversion and ignorance (both for ourselves and others)?
If they do, then it is okay.
May all be well and happy.