There are a number of ways to shoot sunsets. Here I will talk about how to shoot HDR sunsets. A tripod may be required depending on the shutter speed. All that needs to be done is bracket 3 different shots at different exposure levels and merge them in Lightroom or Photoshop. One shot will be underexposed at for example -2EV, one shot overexposed at +2EV and one at standard 0EV. This brings out the best of each image however one can choose to bracket only 2 shots instead of 3 or more shots. The image on the left was merged as one from 3 different exposures.
Now not everyone prefers that HDR look so another way is while in manual mode, if the aperture is set to f/8 and the camera gives a shutter of 1/500 of a second, then underexposure by doubling the shutter so that it gives a reading of 1/1000 of a second. This will also give a silhouette effect to anything in the foreground.