There can be a few reasons for this. The first and most common is that the dog has received a trauma to the area. If this is the case, you might see some bruising and swelling.
Another cause might be a testicular tumor or scrotal problem. This will usually have no other symtpoms aside from the swelling.
At this age, I would be very concered about a tumor or other cause.
You should see the vet first thing tomorrow to have it checked out.
Let me know if you still have questions.
