Under Pressure
The air above the flame is heated, causing it to become less dense, rise, and displace cooler air in the flask. When the flask is placed over the candle the oxygen is used up, and the candle starts to go out even before it is doused by the water. This, however, doesn't "cause" the water to rise except that having lost its heat source, the air within the flask starts to cool and shrink. The outside air pressure does the rest. Don't forget, we live at the bottom of an ocean of air.