If your normal grooming routine includes wiping "gunk" out of your horse's eyes, take a minute to determine the source of the buildup.
Some types of discharge are normal, but others can indicate a problem. To tell the difference, focus on the color and consistency of the discharge.
Watery, clear secretions are probably just excess tears, the fluid produced by the lacrimal glands to lubricate the eyes. Normally, extra fluid drains down through the tear ducts to the nostrils, but if the ducts become clogged, tears will pool in the lower eyelid to overflow and spill down the face. Your veterinarian can flush out duct blockages.
Gray or black grime is most likely debris from a dusty environment. The eye tries to wash away these irritants, but they often become trapped in the fluid, forming the gunk that collects at the inner corner of the eye. Work to improve the air quality in your horse's environment---watering the arena footing, for instance---because his respiratory system is likely to be even more adversely affected by dust than are his eyes.
Yellow-tinged thick discharge is typically pus produced from an infectious process. If the rest of the eye looks clear and otherwise healthy, wipe off the goo with a clean cloth and wait a day. If it clears up, your horse most likely had a minor case of conjunctivitis0 triggered by insects, dust or other particles that were removed naturally by the eye. If the discharge returns, call your veterinarian.
Of course, you'll also want to call your veterinarian if your horse is squinting, the eye appears cloudy or sensitive to light or otherwise seems irritated, regardless of whether there's discharge.