As rainbows often appear in dark conditions you need a tripod to photograph them. Even more so if you're using a polariser on your camera to enhance the vibrancy of the rainbow. If you want a sweeping landscape with the full arc of the rainbow going from one side of the frame to the other you need a wide lens.
Telephotos are good when you have a distant object you want to frame with the rainbow and a standard lens will capture foreground, background and the rainbow with not too much of a problem.
Unfortunately, due to the conditions that are needed for a rainbow to appear, you really do need to be in the right place at the right time (you might see a few more at this time of year though due to the rainy nature of April). You also need to work quickly as they can appear and vanish within a matter of minutes. Don't fancy waiting for one to appear in the sky above you? You'll also find them in bubbles and near other water sources such as fountains in town squares and around waterfalls.
If you do happen to stumble across one, position yourself so the rainbow can act as a frame for a building, interesting rock formation or whatever other photogenic subject you may find. If you don't, your shot will just look empty and boring. For added interest, position yourself so the rainbow intersects your subject as this is where the eye will be drawn to.
As rainbows need moisture and sunlight to appear more often than not you'll have clouds full of rain lingering in the back of your shot but this isn't a bad thing as the dark colours of storm clouds will help enhance the vibrancy of the rainbow, making the colours really stand out. Just make sure you don't meter of this part of the sky though as your rainbow will end up losing some of its punch. If you get the chance, do spend some time assessing which angle the rainbow looks most vibrant at to make it really stand out from the sky behind it.
Leading lines such as deep shadows and long roads will draw the eye into the picture as well as add interest to the shot. If you do this use a small aperture so the foreground and rainbow are both in focus.