Dear,
It is difficult to diagnose a testicular pain online. But, since it occurs on one side and on one one occasion it was excruciating, it is possible that there may be testicular torsion (torsion of the spermatic cord is a more accurate term) requiring urgent medical intervention. But it may also be due to epididymo-orchitis or even a stone in the urinary tract. Some hernias cause testicular pain. Symptoms overlap for several conditions.
Next Steps
Consult a urologist immediately. If it is an infection, antibiotic treatment will set you right. If torsion, surgery should be done to prevent another attack and permanent damage to testicle. Stone can be treated too.
Health Tips
Your condition is not life-threatening but you should not neglect!