It's the stress of going to the vet and going thru all of that mess with the nails. The last time I took my girls to get them groomed, my one nervous girl got a bladder infection the very next day. Their poor little systems get so stressed out. I now do everything for my girls because of that. They used to shake all over when I brought them in and left them. Never again, unless I have to take them to the vet for an illness or something. I learned how to groom them, cut their nails, etc.
So, just be really gentle with him till he calms down and gets back to normal. If the diarrhea continues more than a day, call the vet and see what to give him. Make sure he is drinking and doesn't get dehydrated. And I would NEVER go back to that vet. They totally traumatised him. It's going to be a while before he lets you cut his nails. When he's in your lap, always touch his feet and rub them, so he gets used to it. Good luck!