I'm very sorry to hear about that, it's sympathetic. Black eyes are usually caused by something hitting your eyes or noses. Eye inflection can lead to swelling around the eye,but not the bruising discoloration of black eyes. So, personally, eye inflection won't cause black eyes. Reflecting back the passed period of time, the eyes get hit? If not, go to the doctor and take medical advice for the sake of security.
Well, generally speaking, eye infection can not lead to black eyes. First you should know that an eye infection is a bacterial or viral infection of the eye or the tissue immediately surrounding the eye. And for the Common eye infections, it can be conjunctivitis, which is called pink eye. So that it can affect the membrane that lines the inside of your eyelids and covers the whites of the eyes. Anyway, people get eye infection when they are with irritants. And, after your eyes get infected, it can lead to some other symptoms, such as burning feelings, discharge from eyes, eye pains, itchy eyes, red eyes, and sore eyes. But on the other hand, in some serious situations, it can also make you have some life-threatening diseases, such as the high fever. But it can not cause black eyes, so you should not worry about it.