People with diabetes are more likely to get bacterial infections, including bacterial pink eye and/or eyelid styes. Diabetes affects the autoimmune system, lowering one's resistance to infection.
What can be done to control
Keeping your blood sugar level low and practice good hygiene such as washing your hands frequently and avoiding touching or rubbing your eyes.
One shouldn't pop a style like one would a pimple and should allow the stye to rupture on its own. A stye that forms inside the eyelid might not rupture and heal on its own (Your eye doctor may need to open and drain it)