Get familiar with your camera controls. If the camera is new, or you haven't used it much, take some practice shots now. Most trick or treaters are shorter than you are. Keep your flash distance under eight feet. It's dark out there and most built-in flash doesn't carry past ten feet.
Most cameras have a default setting for maximum quality.
You can override that setting to enable the camera to take pictures in lower light. Each camera is different, so first, experiment on some evening before Halloween. Remember, the picture may look good in the LCD Display. Check it out on your computer before you decide on which method you want to use. But because of the normal dark surroundings, it's still going to occur.