The solar panels themselves are waterproof. Solar power companies take great care to test their products against heavy rain.
Solar energy continues to function in the rain as well as in any other weather condition – and is only concerned with the amount of horizontal irradiance, i.e., the amount of solar energy they can receive.
In fact, the rain may wash away dust and oil from the surface of the solar panels.
Solar energy companies ensure that solar panels are installed so that even heavy rainfall does not affect power production or the installation's life.