styes (hordeolum) are not contagious or infectious like conjunctivitis (pink eye). they are really just inflamed oil-glands. yes these things can be very nasty-looking but they do not pose any risk to customers. as long as the cook maintains a high-level of personal hygiene (hand washing not trying to touch/squeeze these painful lesions) he is capable of working. if the cook is in full-view of customers as he is preparing their meals it could result in a few double-takes from people who may not understand the nature of styes. i work closely with children and babies every day. if i had a big stye i would probably just stay home apply some hot compresses and wait for it to resolve. i pose no risk to the babies but i would get tired of explaining my eye to parents. in general a stye is not contagious so it's not a problem for a cook to continue to work. as always you would want to still practice good hand hygiene. here's a previous answer by dr. hoffman on this same issue: <link>
should a cook with an eye stye work