Rainbows are illusive subjects. Their appearance is unpredictable, and sightings are pretty rare, so it’s a great moment to capture through the lens. You can’t sit around waiting for one to appear, but next time you see one, you’ll be prepared to get a great shot.
1) Use your polarizing filter. Since rainbows are transparent, it will be important for you to exaggerate the colors as much as possible. And try to set your shot up so that the rainbow is against a darker background. It will make the rainbow stand out more.
2) Use a tripod (if accessible) or sturdy surface to rest your camera on. Since lighting may be low during the appearance of a rainbow, and you will be using a polarizing filter, a slow shutter speed will be necessary. You may have to improvise with the tripod though, since you never know when the opportunity to photograph a rainbow will arise!