Yes, excess water in the soil around a foundation will cause hydrostatic pressure to buildup and push against foundation walls, forcing water through the tiniest cracks. Water in the soil around and under the foundation need a way to drain off so hydrostatic pressure can’t develop. Also wet soil will freeze and expand during winter months and can possibly cause damage to foundation walls.