Anytime you have pain in your testicle, go to a doctor. Even if it's not serious, it could be something that gets worse without treatment.
And if you're one of the many people that come to these forums saying they don't want to go to the doctor because you're embarrassed...DON'T BE! The doctors have seen everything, they're not their to judge, they're their to help. If you're uncomfortable with your doctor, switch to one you are comfortable with. If you don't want to tell your parents, tell the one you're most comfortable with, or just realize they're not going to judge you either, they want you to be healthy.