When you cut an onion, lachrymator is released. This compound causes the nerves around your eyes (lacrimal glands) to become irritated.