In your aquarium, light does more than show you your fish. Everything in aquarium water chemistry has connections to everything else. So while light hitting water doesn't cause a chemical change in and of itself, lighting can influence pH in several indirect ways.
If you have plants or coral, the levels of oxygen and carbon dioxide are subject to the influence of photosynthesis. Oxygen and carbon dioxide levels rise and fall in close relation to each other under the influence of living systems. While oxygen has no direct effect on pH, carbon dioxide has an acidic pH, which drops the pH of water. Since lighting promotes photosynthesis, strong lighting can drop carbon dioxide levels and raise oxygen levels. This raise the pH, making the water less acidic and more alkaline.
The Nitrogen Cycle
In an aquarium with live plants, lighting can also influence the pH in another way. Fish produce waste, mainly ammonia. While ammonia itself has a high pH, the biological processes associated with the production of ammonia and its byproducts produce acids and lower pH. However, lights promote the health of aquarium plants. Aquarium plants absorb ammonia and other nitrogen waste products. This removes acidic compounds from the water, raising the pH. Live freshwater plants can produces these effects, but in the marine aquarium, corals cannot perform this function, since ammonia and nitrite are toxic to these organisms.
All of the processes by which plants alter water chemistry depend on strong aquarium lighting. In weaker lighting, plants do not photosynthesize as much, if at all. Under these circumstances, plants may actually produce more carbon dioxide than they absorb, lowering oxygen levels and the pH of the water. Additionally, when their needs are not met, plants may die in the aquarium and rot. Plants with hard stems may not look dead right away, but rot just the same. In this situation, plants produce ammonia and lower the aquarium water's pH.
Plant pH Changes
Drastic changes in pH generally hurt fish, even when the change is towards their ideal conditions. However, most of the changes that lighting and aquarium plants produce benefit the aquarium and move slowly. Additionally, most of the light-dependent processes of aquarium plants have other side benefits, like adding oxygen to the water or absorbing toxic chemicals like ammonia. In general, if you keep plants under their ideal conditions -- and the specifics vary by species -- they will improve water quality in an aquarium.