In DragonVale, the Rainbow Dragon is bred from a Seaweed dragon and a Firefly dragon, with the Firefly at level 10 or above.
Rainbow dragons require all the basic elements at once, so the breeding pair has to collectively cover the full set between them. Seaweed and Firefly together supply that coverage, which is why this pairing is the standard answer rather than an arbitrary one.
DragonVale's rare-element dragons are deliberately difficult, and the game is built around that patience. If you are chasing a Rainbow, plan on a lot of attempts, and treat any guide promising a guaranteed method with suspicion — the odds are set server-side and cannot be influenced by timing tricks.