when it rains heavily, water fills up all the spaces occupied by the air in the soil. In this situation, animals living in the soil have to come out for respiration.
2
Dattraj Piludaria answered this
When it rains heavily. The sand of soil absorb the water and the soil become wet,heavy and uncomforetable for the animals living in soil. So they come out of soil when it rains heavily .