Only a controlled lab study could establish the types of bacteria growing in a birdbath and the rate with which they increase/decrease depending on the degree of exposure to sunlight (and specific temperatures). However, in a totally unscientific way, i.e., based only on personal observation, a birdbath in full sun develops as much yucky, slimy gunk in it over time as the one located in the shade under the canopy of a paper white birch. It makes sense: many bacteria are part of the frass (insect droppings) falling from the leaves and branches. Between this "frass rain," the spores and bacteria being transported by the wind, and the warm temperature, this is "gunk heaven." Some bird species will also drop fecal packets into the water as well. It will probably help if you occasionally clean your birdbath with soap and water, then treat with a dilute bleach solution (at least 1 part household bleach to 50 parts water, or about one teaspoon per cup of water). Let sit for 10 minutes, then rinse well and refill. Finally, always change the water every five days to prevent mosquito larvae from hatching into hungry mosquitoes.