Our water heater has two valves located on extended pipes perpendicular to the hot and cold water lines. When Spring hit, the maintenance people in my complex mentioned we needed to turn the valves before the AC would run properly (we tried running the AC first and it was producing no cold air). Since these aren't connected at all to the actual AC unit, as far as I can see, I'm confused about what they do and whether or not I should turn them back off if I want to switch back to heat.
Answer to Question asked originally
That appears to be unused piping that goes nowhere now. The valves were shutoffs for whatever was that direction. The pipes appear to be capped now, meaning the valves have no function now.
Answer to question as Edited
These pipes and valves still have no purpose. Take the picture you posted to your maintenance people that told you to turn the valves and ask for clarification. FWIW, the valves as shown are turned off.
Additional Guessing and Theories
If your AC uses water it's likely an Evaporative Cooler (sometimes called a Swamp Cooler--typically found in dry/arid climates). In that case, the AC would take a supply line to fill, but not a return line. If in fact turning a valve on solved your problem it was a different valve and not either of the two shown.
It's also possible that your AC unit's supply water supply isn't your water. It's only a guess, but maybe your neighbor (you said apartment) got similar advice to turn on a valve and their valve feeds both units.
In any case my advise above still stands, show the maintenance man the picture you've shown us and ask for clarification about WHICH valve is associated with the air conditioning.