Do you have any idea what could of caused this? So it doesn't happen in the future.
A bit of hay or grass getting under the eye lid and scratching the lid or a hay poke - both are very common in guinea pigs since hay should make ca. 80% of the daily food intake. So it is not something you can stop feeding.
Try to use soft hay to play in and serve any stalky hay in racks but you can never completely eliminate issues.
Just be vigilant and see a vet promptly (i.e. ideally within 24 hours) if you notice a very watery, squinty eye or notice a whiteish/blueish film (ulceration) developing on the eye surface. If there is blood, then it is an emergency (see a vet as soon as possible at any time of the day), as is a bulging eye.
The damage is usually much more widespread than visible and can penetrate deeper into the eye (where it is much harder to treat) the longer it is left. A vet uses UV light and a special dye to assess the damage and prescribe any treatment accordingly.
Normal are antibiotic eye drops (weaker or stronger ones); a analgesic (metacam) for the pain and any swelling and in more piggy savvy vets a lubricant for rehydration (like the tear gel) which also supports the healing process although it cannot heal on its own.
If the infection has penetrated deeper, a strong antibiotic may also be prescribed in addition to above medication.
I hope that this helps you? The eye drops are the same as used for cats and dogs, so any vet should have them available. The same goes for the analgesic. if necessary ask a vet whether they think that metacam and lubricant would be indicated if they don't prescribe it.
I hope that this helps you?