Most people don't think about it but animals actually can get sunburned. It's not as common as in humans because their fur is typically so dense that direct sunlight doesn't make it to the skin. They can still become overheated but true sunburn is uncommon.
That doesn't mean that it can't happen. Breeds that are hairless are absolutely at risk for getting burned. The same is true with a dog that has a thin coat where skin is exposed through the hair, or one that has a localized patch of hair loss due to another disorder. Geography can also increase the risk, due to an area having a lot of direct sunlight or at higher elevations where the atmosphere is thinner and allows more ultraviolet rays.
Excessive sunlight can carry the same risks as it does with humans. You can have physical burns that can be painful or become infected. You can increase the risks of certain kinds of cancer, especially squamous cell carninoma on the face and head of primarily white animals (dogs, cats, and horses). Obviously these are things that we want to avoid. The reason that pigs wallow in mud is to coat their skin and help block sunlight.
Thankfully there are ways to help. First, don't shave your dogs too short for the Summer. The longer hair coat actually helps prevent sunlight from directly hitting the skin, so if the coat is too short you can increase the risks of burns. As with humans, provide plenty of shaded areas for your dogs and try to avoid them staying in the direct sun for prolonged periods. There are sunscreens specifically designed and approved for dogs, but in a pinch you can use plain zinc oxide sunblocks. However, be careful not to let the dog lick at this kind of sunscreen as zinc can be toxic in high enough doses. The key is to not ignore the potential for problems and burns.
Summer sun and heat can carry as much risk for our pets as it does for us. Don't forget about them!