Could he have hernia
First thing is to make sure there is not a hernia
or other anatomic problem referring pain towards the penis area.
Second is whether pain occurs at rest or during erection. There are conditions of the penis that manifest with pain during erection. A urologist visit would be necessary for examination to determine there are no anatomic problems.