Yes, the eye infection may cause your swollen gland which is another sign of eye disorder. You'd better treat it in the medical way by eating the medicine or using the eye drops with anti-inflammation role. You should not eat the spicy food these days which may stimulate your eye nerves. You'd better have the good rest for the eyes.
Well, yes, eye infection can cause swollen eyes. Generally speaking, eye infection is caused by the bacteria, allergies. So if you have eye infection, your eyes can be itchy. What is worse, it can lead to swollen eyes. At this moment, in my opinion, you should not touch your eyes, with the fingers which have irritants. Or it can infect your eyes. And then lead to swollen eyes. For your situation, you need some eye drops, which can be effective to the symptom. Of course, you can go and see the eye doctor, and he can give you some advices.
First of all, we have to understand what swollen glands are. These glands or lymph nodes are part of our lymphoid system, including lymph vessels, the tonsils, the thymus, and the spleen. It includes all the cells, tissues and components which contain aggregates of lymphocytes. At the same time, they all are part of our immune system too. As part of immune system, they will fight against foreign matters and help protect our bodies. This is exact explanation to your situation. Because you got eye infection, the swollen eyes is the response to your infection made by immune system. You don't need to worry too much about it. It is how the immune system working. Yet if there is some other symptoms develop such as night sweat, persistent fever, unexplained weight loss and so on, then there might be some other serious condition which caused your swollen glands. In this case, you need to go to see a doctor for professional help at your earliest.