As I sliced my onion for an omlete the other day, I became curious as to why they make your eyes water and sting. The cutting of onions results in the rupturing of the cells within the onion. This disrupts the cell structure, allowing enzymes to come in contact with sulfides also found in the cells. The enzymes break the sulfides down into smaller compounds of sulfenic acid. These exist in a gaseous state at room temperature, allowing them to reach your eyes. Some of these compounds react with water in the eye, forming some sulfuric acid which stings and burns!
So if you're cutting onions, stand back a bit and don't rub your eyes, it'll only get worse.
Image source: http://www.ritterfarms.com