Here's why:
* Rainstorms happen during the day: Rainstorms are caused by weather systems, and these systems can happen at any time of day.
* Clouds block the sun: The thick, dark clouds that bring rain block the sun's light from reaching the ground. This makes it seem like the sun has disappeared, but it's still there, just hidden behind the clouds.
Think of it like this: You're inside a house with the curtains drawn. The sun is still shining outside, but you can't see it because of the curtains. It's the same with rainstorms - the clouds are like curtains, blocking the sun's light.