My cat is keeping his right eye closed most of the day, and when he opens his eye, there is something wet coming out of it. Here is a picture of him.
You need to take your cat to the vet for this. It is not possible to tell what is wrong for any of us over the net.
Do not try to clean this your self. You do risk making the injury more serious if you do.
The reasons for why your cat keeps the eye closed can be anything from an infection to damage from fighting or it might be a foreign object. You know how painful it can be to get something on your eye, so it is best to let the vet take care of this.
Most likely this is something that is easy for your vet to fix, so you do not need to worry about the treatment.
He could have an eye injury or infection. He could be starting an upper respiratory infection or virus (which can be dangerous for cats). It could be allergies. It could be as simple as an irritated eye from a bit of dirt. My long hair cat occasionally suffers from an 'eyelash' or a strand of fur falling in her eye and irritating it.
You can try -gently- cleaning the outside of the eye area with clean cotton ball and clean water (no soap or anything) to rule out the possibility of dirt/fur, but if that doesn't quickly resolve the issue, you should have a vet rule out injury or any type of infection.