This can be caused by fighting, sharp objects in their cage, among other possibilities. Your rat might show signs of pain, light sensitivity, or be holding its eye shut, and even aggressive behaviour.
What do I do?
Get your rat to the vet asap for treatment. This injury is a delicate one and needs to be handled by a professional. If they eye seems to be gummed up, you can try applying a used and cooled rooibos teabag every few hours, then seek vets attention.
If the wound is serious, the rat could lose its sight in the affected eye, or even the eye itself.