Some soils let water pass quickly through them, but they get dry easily in summer. Other soils hold the water but may get very soggy in winter.
How quickly water moves depends on the gaps inside the soil. Some gaps are made by worms, but most are because the soil grains don't fit together very well.
The best soil has a mixture of sizes of gaps, large ones to let water through, small ones to hold water for plants.