Coffee grounds can benefit the cucumber plants, provided you use them in smaller amounts. During the seed stage, cucumbers can attract pests. Add only 5% of coffee grounds to the compost mixture to prevent pests and mildew.