Thanks for the question. There are loads of things you can do with coffee grounds, tea bags are a bit more tricky.
Coffee's full of good stuff so you can use it as fertiliser in your garden. It's definitely one for the food waste bin if nothing else. Here's a great article19 about all the things you can do with them.
With tea bags, a surprisingly high proportion of them still contain plastic. Most companies are pledging to move to fully biodegradable bags, but few have managed it yet. So have a good read of your packaging before you choose what to do with them. This BBC article 15tells you where you stand with different brands of tea bag!
Hope that's helpful!