Sun exposure is one of many factors (including soil quality, growing temperature, rain etc.) that influence vitamin and mineral levels in fruits and vegetables. That being said, if you find yourself in an orange grove, opt for a fruit grown on the outside of the canopy as the trees in the middle tend to be more heavily shaded and would thus contain less vitamin C. Moreover, if you’re in the northern hemisphere, fruits on the south side of the tree would likely have greater exposure and thus higher vitamin C levels, compared to fruits grown on the north side. Of course, the situation would be vice versa in the southern hemisphere.
–I learned about this fact from: Terry LA, ed. Health-promoting properties of fruits and vegetables. CABI: Cambridge, 2011.