Maybe he hasn't had enough of water time then you brought him out, so he cries? Did you cover him with a towel immediately from the tub??
Maybe you can try "telling" him, "mummy's gonna wash your hair now. See, this is the way I wash your hair." Reassure him that everything is fine and you are with him.