Rainbow is formed on the principle of refraction of light. That is bending of light when it passes through a condensed water vapour. That it the reason it appears bending but not in the real sense. It is normally straight because light rays goes in a straight lines.