We will be in Austria in in early September. Do I need to purchase advance train tickets when traveling between cities (specifically Vienna to Hallstatt and Hallstat to Salzburg) or can we purchase them when we get there?
Buying tickets in advance gives you the opportunity to get a very cheap bargain (called Sparschiene). This kind of ticket is bound to the chosen train but it is neither cancellable nor refundable, though.
At 7:45am there is one direct express train (IC 1118) from Vienna (departing from Wien Westbahnhof [western train station]) to Hallstatt per day.
There are several other connections daily, departing from either Wien Hbf (main train station) or Wien Westbahnhof (western train station), having one train change in Attnang-Puchheim, i.e., changing from an express train to a local train.
For all express trains buying a seat reservation is advised. No seat reservations for local trains.
See here: https://www.oebb.at/en/
Note that from the train station in Hallstatt there is a ferry across the lake to the town. For the ferry you need cash (€4).
The ferry's schedule - in either direction - is in accordance with the train arrivals/departures.
Hallstatt to Salzburg may be better by regional bus, no advance purchase needed. Change of bus at Bad Ischl but no ferry - and better scenery
Change of bus at Bad Ischl but no ferry - and better scenery
There is no direct bus from Bad Ischl to Hallstatt. You need to go from Bad Ischl to Gosaumühle, change there to the bus going to Hallstatt. The bus terminal in Hallstatt is about half a mile south of the town's center.
People going from Salzburg to Hallstatt usually are taking bus 150 to Bad Ischl, and then a local train to Hallstatt (including the ferry from the train station to the town). Alernatively you can go by train all the way via Attnang-Puchheim.