The photoluminescence (PL) and surface photovoltage (SPV) of GaN layers were studied in vacuum and air ambient. SPV data were measured using both a traditional Kelvin probe attached to an optical cryostat, as well as a scanning Kelvin probe microscope. It is found that the upward band bending in GaN decreases from its dark value of approximately 0.9 eV to a value of about 0.3 eV under intense UV light. This band bending then gradually increases in air ambient presumably due to the photoadsorption of oxygen, and decreases in vacuum due to the photodesorption of oxygen. Manifestations of such changes due to the sample environment were also observed in the PL intensity.