Skin lesions can be caused by anything and would have to diagnosed by your veterinarian. They could be anything from insect infestions such as Chiggers, Scabies, Fleas, etc. The could be a staph pyoderma infection or other bacterial or fungal infection secondary to skin allergies. It could be from a poisonous plant such as poison ivy. If your dog also has ear infections than he could have food allergy dermatitis. Please go and have him evaluated.
If is very unlikely that it is from the sun unless you have shaved your dog for the summer, and his coat is so short that he could get sunburn.
Thank You very much I will take him in ASAP!