There are at least two peer-reviewed studies published by the same research group (Ozturk et al. 2013, Comert et al. 2016) that investigate whether wearing sunglasses reduces the symptoms of allergic rhinitis (which includes hay fever). Both studies compare two groups of participants across a treatment period of several weeks. In each study, one group received a defined dose of anti-histamine medication, and the second group received the same dose while additionally wearing sunglasses during the time spent outdoors. Participants provided self-reported symptom scores, and also reported how often they used emergency anti-histamines during the treatment period.
Both studies report a positive effect of wearing sunglasses:
In spite of these limitations, based upon our findings, sunglasses appear to be an inexpensive and simple treatment option for patients with allergic conjunctivitis. (Ozturk et al. 2013:1005)
The present study demonstrated that wearing wraparound eyeglasses was effective in controlling the symptoms, improving the quality of life, and reducing the need for systemic antihistamine and topical ocular treatment in patients with SAR. Beside the statistically significant reductions in ocular symptom scores, the sneezing and rhinorrhea scores were also significantly reduced in subjects using wraparound eyeglasses compared to non‐users. (Comert et al. 2016:729)
In both studies, the effect of wearing sunglasses is significant overall for ocular symptoms, but not generally significant for nasal symptoms.
The earlier study discusses whether it is the protection from UV that causes the reduction of the symptoms, or because the wraparound glasses function as an ocular mask. As the authors acknowledge, both factors are conflated in their study:
One group received sunglasses blocking conjunctival allergen deposition, whereas the other group did not use any glasses, allowing allergen passage or UV along the sides, which is a limitation for this study. Prospective studies with better control groups are needed to more completely characterize the protective efficacy of sunglasses for the conjunctival symptoms of seasonal rhinitis. (Ozturk et al. 2013:1005)
Yet, the later study doesn't pursue this line of investigation. Here, the authors suggest that the effect of sunglasses may have a neurological cause:
The finding in our study that rhinorrhea was significantly reduced by wearing wraparound eyeglasses was in parallel with the results of this previous study and might have been occurred due to the inhibition of a possible parasympathetic neural reflex mechanism. (Comert et al. 2016:729)
Be that as it may, both studies support the claim that wearing sunglasses reduce the symptoms of allergic rhinitis, i.e. hay fever.
Note: I'm not an expert in this field, so I don't know what the empirical standards are. I was not very impressed by the two studies. The case numbers are not very large (in particular in the first study), and the univariate statistical tests seems to me somewhat simplistic given the complexity of the topic. I'm also a bit wary of the dependence of the studies on self-reported scores. Yet, as an outsider, my skepticism might be out of place.