Good drainage stops roots from sitting in water and rotting. In a pot it depends on the holes and the potting mix; in the ground, on the soil's texture and structure.
It is improved by adding organic matter, coarse sand or perlite, and in pots by making sure there are drainage holes.
Waterlogging kills more plants than drought: if in doubt, improve the drainage.

