There is usually no price advantage to buy Swiss train tickets in advance, unless you can get Supersaver tickets (which are probably gone for this month), but if you can get a Saver Day Pass for your Rigi day that will cover the whole trip that day—-boat, train, and cablecar.
https://www.sbb.ch/en/travelcards-and-tickets/tickets-for-switzerland/day-pass/saver-day-pass.html
This will be 79 CHF without a HalfFare card or 49 CHF with.
If you are planning on riding a lot of lifts in the Berner Oberland, you might benefit from a 6-day Berner Oberland Pass, which will cover your travel from Luzern to Mürren and from Mürren to Bern (assuming it is within the 6 day), as well as all the lifts and trains around Mürren and the rest of the BO, except for the Schilthorn cablecar above Mürren, and the Jungfrauntrain above Kleine Scheidegg.
https://www.berneseoberlandpass.ch/
If you get the 6-day pass, the savings on the price with a Half Fare card will just about cover the 120:CHF cost of the HFC. Then you can use the lower price on the Saver Day Pass, saving 30 CHF each there. And you can use the HFC to use the half-price fare for your travel to Luzern from the Zurich airport, and from Bern back to the airport.