It is not the strong odour of the onion that makes us cry, but the gas that the onion releases when we cut the bulb.
(source))
When you slice through an onion, you also cut through the onion cells. When the cells are cut, enzymes which are normally inside the cell are released. One of these enzymes, alliinase (from Allium the Latin name for onion), then reacts with a sulphur-containing compound known as ‘Prensco', that is also released by cutting the cells. This reaction results in the formation of 1-propenylsulphenic acid, which is further converted by the LF-synthase enzyme to propanethial S-oxide gas. This gas is also known as the Lachrymatory Factor (‘crying factor'), which also explains the name of the enzyme LF-synthase (meaning Lachrymatory Factor synthesising enzyme)
This gas is instable and can react with water which results in, among others, sulphuric acid. When this happens in the eye, the eyes start to neutralise the acid by producing large amounts of water, and thus make us cry.
Image from: Imai et al., Nature 419(2002)685
Many people start rubbing the eyes, which often works contra-productive if you just cut onions, as most likely your hands are covered with onion juice. Rubbing thus will make the irritation worse.
Other members of the onion family lack or have much less of the enzyme and thus generally do not cause tears when cutting them.
There are all kinds of remedies for dealing with this irritating phenomenon, some more effective than others. As a general rule, move your head as far away from the onion as you can, so the gas will mostly disperse before it reaches your eyes.
Keeping the onion wet, or cutting under water is very effective, as the gas immediately reacts with the water around the onion and never reaches the eyes.
Glasses and goggles also prevent the gas to penetrate the eyes to some degree, goggles being the most effective (although not practical).
Cooling the onion may also help, as the enzyme activity is much slower at low temperatures. Cooking destroys the enzyme.