Train is the most comfortable option to travel between Bratislava and Vienna, but buses are cheaper (up to ~40%). There is no discount for advance purchase of train tickets, so you can simply buy it at train station before departure. When it comes to buses, you may also get promotional fare of 1€ / one-way (from RegioJet or Slovak Lines) when booking well in advance but amount of these tickets is very limited. Once they are sold out, prices of RegioJet and Slovak Lines are the same whenever you buy your ticket (but it's cheaper to buy it online rather than on board). FlixBus has dynamic pricing so booking in advance can save you money.
There is a direct city bus between Bratislava airport and central train station. Note that you must buy ticket before boarding the bus.
Can you please tell me is there a very big difference if you buy online bus tickets instead of buying at the station? Do you know what is the price if you buy at the station?
Different bus operators have different policies.
Slovak Lines: 5,50€ online or in ticket office (at central bus station), 7,00€ on board.
RegioJet: 5,00€ online or in RegioJet ticket office (note that they don't have ticket office at central bus station), 5,50€ on board (or from ticket office at the central bust station).
Thank you very much