While light is always an important factor in taking a photograph, with a sunset light is the factor. You want a richly saturated image, one that accurately captures the colors in front of you. Your job as the photographer is to let the camera know what to look at in order to record those colors properly.
The first step is to turn off your flash. Since your flash will often be triggered automatically in low light — creating a blast of bright cold light — turning it off will allow the warm natural light to dominate the picture. If you have to use the flash (some cameras will not allow you to turn the function off), opt for the "fill flash" or "night photo" setting to reduce the power of the flash. These settings can be found by cycling through your flash options, usually symbolized by a lightning bolt icon.
The second and more important preparatory step is to fill the camera frame with the sky. Point the center of the frame above the horizon line and fill the frame with as much of the color and light you want captured. This is how you tell the camera's light meter what needs to be properly exposed.
Once you have filled the frame with sky, push the shutter button half way down to lock in the exposure and the focus; you can recompose the shot, if need be. As long as you keep the shutter button pressed halfway down, the exposure and focusing point will remain the same (for up to 30 seconds on most cameras). When you're ready, press the shutter all the way to take the picture. This technique works with all auto-focus cameras, both film and digital. A side effect of recomposing and setting the exposure value to very bright light is that objects like trees and buildings will lose some detail and be silhouetted.
Here are more tried-and-true bits of advice:
Take your camera with you! You never know when the perfect sunset will occur. And if you know you'll be out all day, pack an extra battery. You may also want to note the exact time of the sunset (check a local paper or a weather-oriented Web site). Arrive an hour beforehand to set up your shot. Once you're ready, begin photographing and keep shooting as the intensity of the light changes. Don't stop just because the sun goes down. The 10 to 15 minutes of diminishing light just after sunset can yield some of the best results.
Set your own film speed
Most modern cameras, film or digital, set the film speed (ASA/ISO) automatically. But checking it manually will ensure better results. Rather than use an ASA/ISO of 50 or 100 (good for bright daylight), use a faster speed like 400 or 800 ASA/ISO that is designed to be used at sunset and in other low-light conditions.
When it comes to resolution, aim high
If you're using a digital camera, choose the highest resolution your camera will allow, usually a "fine" or "super fine" JPEG (A JPEG is a standard, highly compressed image file). Access to these settings can usually be found by pressing the Menu or Function key on your camera. If your camera has a "raw" or "TIFF" mode, try it. These modes will compress the image less than a JPEG and will ultimately yield a bigger file and a richer image. While the files may take up more room on your memory card, the inconvenience will be worth it once you see the sunset prints, particularly if you enlarge the prints beyond five by seven inches.
Visualize in advance
Try to envision the picture before you even bring the camera to your eye. Then take a few extra seconds to perfect the image. Be sure that everything you want to capture is clearly in the frame and remove any extraneous or distracting objects from the composition. What qualifies? It's up to you to determine what seems distracting, but as a general rule, less is more with a sunset photo — let nature put on its show.
Compose off center
Centering objects in the frame can make for a static composition. Try placing the sun to the left or right. Use objects such as trees or buildings to help frame the image and give it depth. If you are photographing near the water, you may want to incorporate it into the image to show the sunset's reflection on the surface. Clouds are another element that can add texture and pattern to the image.
While these tips have been designed with the sunset in mind, they will also work very well for a sunrise. The key difference is that you won't be able to shoot into the sun at all because of its blinding early-morning intensity. Instead, keep the sun at your back and focus on the light as it falls in front of you.