As soon as it gets dark to about 9pm (the latest) if hours have not been set in your area. In many areas, hours are set and it is best to find out what they are and abide by them.
The hours of trick-or-treating depends on what neighborhood you live in. Most communities are starting early and ending early- so it isn't late or dark. But, usually, people think it is much more fun...
6pm-10pm.
Most people come home from work around 6 so if you want to hit the most houses and get the most candy, these are the prime hours. If you start early, around 3 when you come from school, you...