Step 1: In the garden
Spent coffee grounds can be mixed with lye to make a great composting agent, you can even throw in the coffee filter, too!
Worms in compost like to eat the bacterium that grows on the facets of coffee grounds, though the grounds themselves are a a food source it also adds grit to the worms' digestive system allowing them to digest better.
Small amounts of coffee grounds can be added directly to top soil, especially on plants that like high acidity in the soil like azaleas or roses. Coffee is high in nitrogen, calcium, magnesium, potassium and other trace minerals, spreading around a thin layer of coffee grounds on your soil will allow a slow release of these minerals into your plants.
Be aware of which plants like acidic soil (roses), and which plants don't (tomatoes).
Coffee has a very strong odour which many insects and animals do not like. In addition, it's been suggested that mosquitoes, ants, slugs and maggots all dislike the acidity of coffee and will stay away from areas where there is high concentration of acidic soil.