Thanks for your query.Based on the facts that you have posted it appears that you have
developed Sebaceous Cysts over scrotum
The skin of this area is rich in sebaceous glands so more prone to develop Sebaceous Cysts due to accumulation of sebum beneath skin.
Normally no treatment is required a they fade away of their own.but need to be treated if get infected.
Consult qualified General Surgeon
for clinical examination to confirm the diagnosis.
You may need to get it excised in Toto under local anaesthesia.
The pain that you get in Testicles is not related to these cysts.