I'm sorry to hear that your dog is unwell.
There are a few possibilities that come to mind. Normal, healthy skin should not just randomly turn crusty and begin peeling, so there is some reason why this is occurring. I will help you to determine why.
One possibility is that there was some sort of trauma or other irritation to the testicular area. This can cause swelling and pain and it's a dog's natural reaction to begin licking at an area that's irritated. But the licking just irritates the skin further, so you end up with a skin infection that can emit a discharge of fluid, creating a crusty texture. The skin, when damaged due to infection or inflammation, will naturally peel away after a couple of days. The very outer layer will peel away when it's stretched and damaged, so that may be what you're seeing - peeling due to inflammation or infection.
Now, the infection may be just superficial and minor. But, I'm guessing that he's still messing with the area by licking at it. No? Again - completely common if he's experiencing discomfort. So you'll need to clean the area a couple of times per day to help promote healing. And you'll need to put a lampshade - also known as an "e collar" on him to prevent him from licking and messing with the area.
Another thing that comes to mind is some sort of parasite infestation or fungal infection. Parasites can be introduced on a simple outing like a walk, so your dog doesn't necessarily have to do anything out of the ordinary to be affected. Parasites alone can cause hair loss, irritation, peeling, infection, itching, and other types of irritation, but some of these symptoms also occur due to the dog himself - the licking, again.
So that's one possibility. If this is the case, he'll need two doses of a parasite medication, ten days apart, and depending on how bad his skin is looking, he may need antibiotics as well. If a fungal infection, like a yeast infection, is to blame, this too will require medications from the vet. So that's something else your vet will need to investigate.
In your dog's case, I would recommend a trip to the vet for an exam. In the meantime, he'll need to be washed twice daily to help heal the area.
Wash the affected area twice a day. Use some antibacterial soap - like Dial - and wash the whole area to help kill bacteria. Rinse very very well and dry him off. Then, get some Betadine (a liquid found in the first aid section of the drug store) and put some on a cotton ball and apply it generously to any areas of broken skin. Then, dab a tiny bit of antibiotic ointment on any crusty areas or area of broken skin. You'll need to disinfect with betadine and apply the ointment twice daily until you can see the vet - which I would recommend ASAP. The cleanings will help limit infection.
Also, if he's itchy, try some hydrocortisone spray (or cream if the itchy area is mostly hairless), found in pet stores. This will help with the itching, and it should help the situation from getting worse in terms of breaking open the skin due to scratching or licking. This should help, but be sure to apply the cream or spray before the antibiotic ointment.
Also, photograph the area once a day. This will help you track the progress. Once we begin cleaning the area, and limit the access with a lampshade collar, it should start to improve. If it doesn't, then that's a sign that a return trip to the vet is required.
Here's a couple of articles you may find helpful:
Let me know if you have any additional questions. And I hope your little friend is feeling better soon!