As coffee grounds are natural and contain plenty of organic matter, they can be helpful in improving drainage. Just make sure you mix them in well with the soil before planting your plants, as over-application could cause problems.