Stones in the kidney will cause pain to the testicles during ejaculation. Prostatitis also cause pain during ejaculation. Take antibiotic with doctor's advice.
If a painless and immobile stone is situated anywhere in kidney, ureters or bladder, there will be generally no pain provided the stone is of a small size. If the stone is mobile and descending, it will be very painful even if the man is not doing intercourse.