Many professional photographers use lens hoods to eliminate sun spots, otherwise known as lens flare, when they're shooting. Without a lens hood or some other makeshift means of blocking the sun, there is usually little that can be done to prevent unwanted splotches and streaks from appearing in your outdoor photographs. If you're editing in Photoshop, though, there is a way to remove colour-specific spots caused by the sun.
Open Photoshop and get the image you'd like to work with. Do this by clicking on "File" on the top navigation, then "Open." This will allow you to access the image wherever it's stored on your computer.
Create a Hue/Saturation Adjustment Layer. Do this by locating "Layer" on the top navigation, rolling the cursor down to "New Adjustment Layer," then selecting "Hue/Saturation." A window with layer options will automatically open.
Name the layer whatever you'd like, and leave all options, Color, Mode and Opacity, as they were when the window opened. Click "OK" and a new window with layer options will open. You should see a pull-down menu and three sliders.
In this new window, locate the top pull-down menu, marked "Edit." Select the colour that most closely matches the colour of the sun spots in your picture. For example, if the lens flare created yellow spots in your photo, select "Yellows" from this menu. Don't close the window.
Notice that the eyedropper tool is automatically opened once you've made your selection. Take this eyedropper and click on one of the spots you'd like to eliminate in your photo. Try to choose the spot with the most concentrated example of the colour you're targeting.
Go back to the still-open window and click on the middle slider, marked "Saturation." Pull the slider as far left as is necessary to eliminate the yellow from the lens flare.
Notice the slider below "Saturation," which is "Lightness." If your sun spots are still present, albeit without colour, pull this slider to the left to reduce their brightness.
Click the "OK" button on the right-hand side of the window.
If your photo has lens flare in multiple colours, try repeating the above steps for each of them. Note the "Preview" box in the "Hue/Saturation" adjustment window. You can check and un-check this to see a before-and-after representation of your work.