Releasing some material in onion can motivate nerves in the eye. 
stimulation of nerves in the eye  often contribute to a stinging sensation in the eyes.
releasing some material in onion can contribute to a stinging sensation in the eyes