Because  when white light in sky splits it break down into its seven constituents.
1 5 1
Bcoz when d rays from sunlight passes thru d raindrops the raindrop act as refractv medium n with certain angel the light rays get dispersed and form color spectrum . thus with diffrnt angle diffrnt color formd... hence 7 colord rainbow form

1 4 1