Coffee grounds can be good for growing tomato plants and tomatoes but you should reduce the acidity of the coffee grounds by mixing them with compost and then plant the tomato plants with the coffee grounds in the compost.
You can put some coffee grounds around the tomato plants too but just don't put too much coffee grounds around the tomato plants at one time because it can be too acidic which can kill the tomato plants.
Coffee grounds in moderation though can help the tomato plants grow and stay healthy as long as you don't put too much of them around the tomato plants at one time.