The alcohol is great at dissolving sugars that are stuck to the pan -- by doing so near the burning point of sugar, you "rescue" the sugars from burning to carbon, et voila, caramelized sugars. Further, the steam breaks down the cell walls, freeing delicious juices for caramelization and breaking down the structure to improve heat transfer. You can get there low & slow, or you can add a few well timed splashes on medium high for nicely caramelized onions in minutes. It's a threshold game, and the closer you come to burning the pan, the darker onions get. Contrary to the sibling comment, I prefer white so I get clearer feedback about that threshold.