The pain can be of a rib fracture
if you've had a fall or trauma. Otherwise as you said that the investigations were fine it can be a musculoskeletal pain
but that shouldn't be so sharp.Pleurisy
also can cause such a pain but the Xray should have given us some clue however a CT scan
chest would be more better to look at.
Lastly it can be herpes that may recur after the pain for 3-4 days