Yes, herpes can cause eye swelling. Eye herpes is an inflammation of the cornea caused by the type 1 herpes simplex virus. It can produce painful sores on the eyelid or eye surface and lead to the eyelid swelling. To get rid of eye herpes, you should be sure which part of your eyes has suffered from the infection so that you can receive relevant effective treatment. If the eye herpes is superficial, you can take some antiviral eye drops or ointments, or oral antiviral pills to alleviate your symptoms. You can ask an eye doctor to help eliminate the infected cells and apply a patch so that the cornea can heal. If the case is serious, it should be treated with corticosteroid drops. Wish you recover soon.