How was the physics of rainbows discovered?
Rainbows have been there for billions of years, and people have been noticing them for the whole time there have been people (either about 200,000 years if you only include modern Homo sapiens or more like 2 million if you include some of our closest ancestors).
Aristotle in 4th century BC knew that water droplets bend light, and was able to explain why the shape of a rainbow is round based on the fact that we see the light that was bent go into our eyes at the appropriate angles, but it was just a brute fact for him; he had no idea why the angles were what they were or why rainbows were in many colors.
The physics behind them wasn't actually explained until the early 14th century, independently by a Persian mathematician named Kamāl al-Dīn Fārisī and a Dominican monk named Theodoric of Freiberg.
Much of those discoveries were in turn lost for centuries until they were independently rediscovered by Rene Descartes in the early 17th century.
What they figured out was that water's refractive index is such that there are two ways that light can be bent by a spherical droplet of water; one bends at a maximum of 42 degrees, the other at a minimum of 51 degrees. Those are the two edges of a rainbow.
It wasn't until Isaac Newton that we explained why they show all the colors in a row; this is because the refractive index of water isn't actually constant over all wavelengths, so long wavelengths (red) are bent a little bit less than short wavelengths (blue). Thus, the light entering our eyes is spread out based on its colors.
The story still isn't done, because we didn't actually have a complete theory of refractive index until the early 20th century with the advent of quantum physics. Even today there are some unsolved problems in quantum physics.
In this sense, the "discovery of the rainbow" really covers just about the entire whole of human existence---we knew they were there as long as we have been around, we've learned more about them in every generation of science, and we still haven't quite figured out everything about how they work.