Adding coffee grounds is a good way to add organic matter to soil. It can be worked it into the soil before planting, spread it periodically on top, or added to a compost bin. All three methods work fine.
Coffee grounds are not effective in change soil PH.
Coffee grounds are only mildly acidic, s adding them directly to the soil or as compost is not an effective way to acidify soil. On the other hand, coffee grounds can be added to vegetable garden plots as well as directly around annuals and perennials. But don't expect the grounds to produce the acidic PH levels that blueberries need.
Click here for an OSU extension article that provides more information.