Propanethial-S-oxide is a gas that's released when the cell wall of an onion is broken. This gas reacts with the water in your eyes and produces sulphuric acid. Getting acid in your eyes sucks, it also burns.

There are some ways to prevent this:
  • Handle onions underwater
  • Slice from the sides, rather than ends, avoid the root where the most gas is
  • Wear goggles