Hallstatt is definitely a day trip destination. I'ts a quaint lakeside village nestled in a valley of mountains and fog in the middle of Austria. I got the bus there from Salzburg, spent a few hours walking around (because thats all you need) and was back at my hostel by 8. I left my hostel at around 8 30 in the morning and arrived at Hallstatt at 11ish. The sun sets incredibly early so make sure you get there around 10 to make the most of the daylight. I wouldn't recommend staying here overnight as there is just not enough to do. I walked around the entire village and all the way back down the valley to the salt mines in less than a few hours. There are also limited eating options here so I recommend bringing food with you, especially as it is an incredible place for a picnic. The was one supermarket but it was closed the day I was there. At the end of the day (around 2pm) if you have time, get the 543 bus from Hallstatt to Gosaussee for 5 euro. Gosau and Gosausee was one of my favorite places on the trip. In summer all the lucky locals swim here, with wooden diving platforms. The lake is surrounded by many walking and hiking paths, non of which I got to explore as I was only there for half an hour, I got there at 5 pm as the sun was setting and it got incredibly cold ( -2 degrees). The last bus out of here is at 5.30 so make sure you don't miss it.
I caught the bus from Salzburg which took about 2 hours. The bus was far cheaper than getting the train and drops you in the center of the town instead of over the lake (which you have to catch a ferry across) like the train. The bus was number 150 from the Salzburg Main Station which gets you to Bad Ischl in 90 minutes. After about a 10-20 minute layover in Bad Ischl you get bus number 542 which will take you directly to Hallstatt. On the day I went the trains were under construction and they had a rail shuttle bus running which I snuck onto to save a few $$$. If you do want to catch the train from the Salzburg Train Station take the OBB line to Attnang-Puchheim (90 minutes), switch trains and take the local REX to the Hallstatt Station (90 Minutes), and lastly take a short ferry across the lake (15 Minutes). If you have time at the end of the day (which you should) make sure you get the 543 bus from Hallstatt to Gosausee which is a lake about a half hour drive away. I got there just as the sun was setting and had the place completely to myself. It was the highlight of my time in Austria so pls go if you have time.