All right, from what you said I can see that your life is out of order recently. So, it is true that depression or a lack of immune system could give rise to some negative impacts on your eye health, including allergies to sunshine or something else. For many parts of your body is interconnected. Anyway, it would be nice for you to be happy and stay in good mood, and what matters more is to take more exercise to resist some diseases.
Depression can affect our eyesight. People suffering from anxiety can weaken their eyesight or even lose their eyesight. Sometimes, when I am in a low sprit, I can not see things clearly. So do not let unhappy things affect you. Just have a positive attitude towards life, towards work, and anything else. And when you are not happy, you can go out with friends, or eat an ice-cream, which I think can make you happy.
Sensitivity to light is associated with depression. Actually, sensitivity to light is directly caused by anxiety symptom of depression. According to a report, light sensitivity commonly occurs to people with problems such as depression, pain, high blood pressure and so on. Except for sensitivity to light, depression will also cause decreased interest or pleasure, change in weight, sleep deprivation, retardation and "brain fog" and so on. I suggest you adjust your own mood, and try to be happy, for a happiness mood is an effective therapy for many diseases.