The sun doesn't cause algae--improper chlorination of your pool causes algae. In the presence of too-low chlorine, the sun just provides the heat to speed growth up. As long as your water is properly chlorinated, you don't HAVE to run your pump during the middle of the day.

Janet