It helps stabilize pH, but also oxygen and other dissolved gasses.
When involved in photosynthesis (because they are under light), plants consume carbon sources (mostly CO2 from the water column) and release oxygen. This helps "buffer" or raise the pH, since CO2 is acidic in solution. When involved in respiration (in the absence of light), plants consume oxygen, and release CO2. This can cause the pH to drop a bit.
You have two planted environments in your tank - the display tank (corals contain symbiotic algae, plus the coraline and other algae growing on your rock) and your refugium. If you were to light them on the same schedule, they'd both be raising the pH and oxygen content during the day; while lowering the pH and oxygen content at night. Hence, most reef keepers tend to run their 'fuge lights at night, which creates a much more stable environment - one plant community is taking in oxygen and releasing CO2 while the other one is taking in CO2 and releasing oxygen.