Only trick-or-treat on well-lit streets. Be sure to only stop at the houses which have their porch light on or show other signs of participating.
Even if you're planning to dress as a black hole for Halloween, make sure that your costume inlcudes some reflective tape or carry a flashlight to be easily spotted by passing cars.
More and more people are cognizant of food allergies and try to eliminate handing out candy with peanut butter, nuts and other allergens. However, if you are allergic be sure to ask if the candy you are taking has been in contact with anything that might make you sick.
Take a good look at your candy before you eat it. Make sure the wrapper is intact and inspect for any nonedible objects before eating. Use extra caution when consuming homemade or unpackaged treats.