Why Do Flies Come Out in the Rain?
Rain causes flies to find shelter under leaves and logs, dig underground, and generally avoid being in direct contact with water. They will also try to get away from areas that are windy, but not completely soaked. However, some very large flies will not stop flying in the rain, and will simply fly under the cover provided by the leaves and logs. Raindrops do not have enough force to knock these flies off course, and they may even be able to take advantage of air currents.
Insects use their shiny scales to attract mates over long distances, so they need to remain clean. Water also stains the scales and ruins the shiny appearance of their wings. If you ask an insect, it takes forever for its wings to dry completely. When they do, the raindrops push them away.
When rain falls on the ground, most insects seek shelter. In fact, many insects are sensitive to air pressure changes and can predict bad weather. They will seek cover and rest on tree trunks, leaves, and tall grass to avoid the weather and keep warm. Because of these properties, they can sense changes in air pressure and can easily find a place where they can find shelter.
Moreover, farmers and ranch owners depend on rain to water their cattle. A simple water hose from your house will not be enough to keep them well-hydrated. Water is mostly supplied by city aquifers or wells. It is not surprising that flies and mosquitoes come out in the rain if they have a place to shelter.