There are too many possibilities to list here, including viral or bacterial infection, allergy, or autoimmune problems.
Signs of a really serious problem include: the vision
in that eye
is now worse, or you see double when both eyes are open. If you wear contact lenses, take them out. If the swelling improves today, then monitor it yourself. If no improvement, see an ophthalmologist this week.