Rainbows are shy subjects. They don't appear very often and when they do they can go from bright to faint and then vanish again in a matter of minutes. Most of the time you have to be in the right place at the right time but there are a few things you can do to maximise your chances of snapping a rainbow.
Unless you have a rainbow that looks like it's been plucked right out of a children's story book the chances are it will look boring on its own. To take a successful rainbow shot, have it frame another dominant object. Rainbows are faint things too so look for dark backgrounds that can enhance the colours. Storm clouds are perfect and as rainbows need falling water/mist and sunlight most of the time you have a good background served to you on a plate. Be careful not to meter off the dark sky though as this will cause your rainbow to lose its vibrancy.
If you're after the sweeping landscape shot your best chances are at sunset or sunrise but you don't always need the full rainbow for a great shot. At the end of the rainbow you won't find any gold (sorry!) but you will find the makings of a great picture. Where the rainbow intersects the earth is where the eye's drawn to so zoom in on it or if you want a wider shot, have it intersecting an interesting object. If you can't get the rainbow to intersect or frame your subject you need to move your feet. By doing so you may find the rainbow is more vibrant too.