Your cat may become excited when covered in water, so to decrease the damage he'll cause, trim his nails before you give him a bath. Try to do this a few hours or even a day or two before the bath so he has time to calm down bathing.[1] Take care to cut at a point which will not cause pain or bleeding.
Giving your kitty treats as a reward for getting his nails trimmed will always make him feel better and calmer.