It is not the strong odor of the onion that makes us cry, but the gas that the onion releases when we sever this member of the lily family.
The cells in the onion are separated by a membrane into two sections. One side of the membrane consists of enzymes, while other side contains the molecules that consist of sulphur compound. When you cut the onion, a number of onion cells break open and the contents of both sides of membrane mix together. The enzyme causes the sulphur compound, amino acid sulfoxides to undergo a series of chemical reactions. During these reactions, sulfenic acids are formed, which are immediately converted into a volatile gas, propanethiol S-oxide, which then couples with the enzymes in the onion to emit a passive sulfur compound. When this upwardly mobile gas encounters the water produced by the tear ducts in our eyelids, it produces sulfuric acid.
In response to the caustic acid, our eyes automatically blink, and produce tears which irrigate the eye, and which flush out the sulfuric acid.
Another reflex to rid the eyes of a foreign substance, that of rubbing our eyes with our hands, often exacerbates the situation, because our hands are coated with the caustic, sulfuric acid producing oil from cutting the onion, which we then rub directly into our eyes.