I have always been unsure about this. I see English people on TV saying it an American import. But in Northern Ireland kids have gone around the doors on Halloween for as far back as I can remember. Except they ask for money rather than sweets, and they don't say Trick or Treat. they sing a rhyme (but recent years this has changed the the American Trick or treat) the rhyme goes:
"Hallowe'en's coming on and the goose is getting fat,
Would you please put a penny in the old mans hat,
If you haven't got a penny, a halfpenny will do,
If you haven't got a halfpenny, God bless you."
But when I talk to some people from England and other parts of Ireland they don't know what I am talking about.