Did he hurt himself during the sex or otherwise? sex- protected or unprotected- doesn't typically cause any testicular pain. Has the pain now subsided? since I see this question was posted more than a week ago.
If the pain persists, ask him to see a urologist.