While the phenomenon of rainbows was known long before Newton, his book "Opticks" (published in 1704) provided a detailed and scientific explanation of how they form. Newton's experiments with prisms and his theory of light decomposition helped to understand the role of refraction and reflection in creating the colors of the rainbow.
Let me know if you have any other questions!