Find a Rainbow. Rainbows need water droplets and the bright sun. Ideal locations: waterfall, fountain, sun/rain.
Composition Include at least one point where the rainbow hits the ground. Perhaps use the rule of thirds by not putting the rainbow dead center of your image.
Watch for distracting objects in the frame. Often, I miss the distracting objects in the foreground like trashcans and street signs.
Some backgrounds work better than others. You want to make sure that the rainbow stands out on the background. Often more is less --avoid clutter. Often darker backgrounds bring out the rainbow.
Foregrounds. Allow the foreground to complement the rainbow. Avoid strong colors and distracting objects. Allow the foreground to lead your eye towards the rainbow and give the rainbow depth (path or body of water leading to rainbow) Be careful when you choose to put a person as the foreground of the rainbow. People often distract from the rainbow. Oftentimes silhouettes of people are complementary.
Depth of Field. Choosing a shallow or broad depth of field can set the tone of the shot. A shallow depth of field (or aperture of f2.8) will focus in on the rainbow but blur out the background and foreground which can be ideal if either is unpleasant. A broad depth of field (or aperture of 16) may be nice if you are out in a beautiful nature setting with a pretty foreground and background.
Focal length. Lens choice can be important. Use a wide angle lens if you want the entire rainbow. Use a telephoto lens if you only want part of the rainbow.
Circular polarizers The circular polarizer filter will reduce glare, cut down on reflection, and pop the clouds and rainbow.
Tripod. Consider using a tripod and a self timer to prevent camera shake. It also will allow you line of the horizon. In some cameras you can add grid lines to the display which will aid in keeping the horizon straight and level.
Manual focus may be needed if you are having problems with the camera focusing on the rainbow.
Color Style. The landscape mode may give your rainbow added color. Setting the picture style or picture control to vivid may enhance your photo.
Consider the HDR. The high dynamic range (HDR) mode will enhance the photo when there is a contrast in lighting throughout the image. Multiple images are stacking together to get a better photo. Cell phones have this mode.
Consider using different meter modes. Changing from the matrix or all purpose light meter to center or spot metering may lighter or darken your image.
Consider exposure compensation. This mode will allow you to darken or lighten your image to add more detail and contrast. Remember this will darken or lighten the entire image.