Absolutely! I make coffee every day in a french press and the grounds along with the rinse water go straight into a bucket which then goes either into the compost pile or directly into the plant beds. It's got a lot of potassium which promotes flowering among other things.
When I first tried it, it was on tomato plants that were six feet high with not a flower on them (I was dense back then) two weeks after a few daily applications of coffee grounds/rinse water and left over coffee, they were covered in flowers. The squirrels really enjoyed those tomatoes.


. Following year, the cats really enjoyed those squirrels.
I've heard that fermenting the banana peals with the coffee is very good too and I don't doubt it but haven't bothered much beyond throwing them in the compost pile.
It does really improve the soil, both the soil bacteria and the worm really seem to like it.