
What happens when you cut into an onion? Stand around long enough and your eyes start to water and burn. This happens because the onion is, in effect, waging chemical warfare upon you.
When the knife passes through the onion it rends the cell walls and releases volatile chemicals, one of which is a fun vapor called sulfinylpropane. This lachrymatic little bugger wafts up from the cutting board and adheres to the wet surface of your eyeball, where it swiftly transforms into dihydrogen sulfate, which you probably know by its street name: sulfuric acid.
To repeat: when you chop an onion, SULFURIC ACID IS BURNING OUT YOUR EYEBALLS. In a way, each onion chopped is a mini-reenactment of the Second Battle of Ypres.
There is, however, a way to prevent this. Be sharp, be fast, be efficient.
BE SHARP. This is all about your knife. The only thing a knife wants to do is your work for you. When you use a knife to slice, it's doing the work. When working with a dull blade, however, you press down on the knife to force the blade through the onion, which means you're doing two things: 1) the work the knife should be doing, and 2) releasing a shitload of sulfinylpropane into the air. A sharp knife will pass more easily through the onion and release less eye-burning acid gas.
BE FAST. No matter how sharp your knife, you're gonna have sulfinylpropane flying around. The sensible thing to do, then, is to get your onion choppery over and done with as quickly as possible to minimize the chance of getting some in your eyes. A sharp knife will help, but the best way to achieve this is to...
BE EFFICIENT. Make your cuts count, and USE THE ONION. It has layers: exploit them. Knowing where and how to slice will get you an entire onion chopped in no time.
So how do you do that? Like this.
Step 1: Slice the top off the onion and halve it lengthwise through the root. Peel off the skin and set it cut-side down on the cutting board.

Step 2: Make a series of narrowly spaced vertical cuts down the length of the onion that go almost all the way to the root end.

Step 3: Now make a series of cross cuts, keeping the knife angled toward the center of the onion.

Still not clear? Well here's some slick video with super-high production values demonstrating the technique.
An entire large yellow onion reduced to a fairly small dice in less than 90 seconds. None too shabby.
Now, there are other ways to keep acid out of your eyeballs. Goggles, for one. Though rumor has it that they do nothing.