Even if coffee grounds aren’t effective at keeping snakes away, they definitely have other benefits in the garden, I use coffee grounds as a compost additive, they add nitrogen to the compost pile, which helps plants grow. In addition, they help retain moisture and attract earthworms, and prevent local pests such as ants and slugs.