When sunlight is available, algae use nutrients and produce oxygen through the process of photosynthesis. Most oxygen available to fish comes from algae. During nighttime and cloudy weather, low sunlight causes algae to switch from photosynthesis to respiration, thereby consuming oxygen needed by fish.