Onions contain amino acid sulfoxides that form sulfenic acids in the onion cells. Both the enzymes and the sulfenic acids are kept separately in the cells. When you cut the onion, the otherwise separate enzymes start mixing and produce propanethiol S-oxide, which is a volatile sulphur compound that starts wafting towards your eyes. The gas that is emitted reacts with the water of your eyes and forms sulphuric acid. The sulphuric acid thus produced causes burning sensation in your eyes and this in turn leads to the tear glands secreting tears. Thus you end up with watery eyes every time you cut onions at home.