We are planning to take a day trip to 5 Terre next summer. We will be staying in Tuscany. What is the best way to get to the trains? Should we drive to La Spezia and buy tickets there? Or is there a better place from which to buy them?
Unfortunately you haven't said where you will be based in Tuscany, which is extremely relevant...Tuscany is a large area.... but there is no particularly good reason to drive to La Spezia in order 'get to the trains', unless you really want to make that journey. Trains which serve the CT villages are not special trains which run only from La Spezia: they are just the ordinary services which run along that main line..a line which continues both to the north and the south.
So I suggest you simply take the train to whichever CT village you want to visit first from a large railway station nearest to wherever you are based e.g. Florence (from the main station, Firenze Santa Maria Novella) or wherever is easiest for you to drive to and (most importantly) to park.
You will almost certainly need to change trains en route but that really isn't a problem, nor is it in any way difficult. Railway timetables are set by default to allow ample time for changing from one train to another. Stations have electronic signage on the platforms, at platform entrances and in the main entrance. Platform signs tell you which train arrives next, its departure time, its destination and all its intermediate stations. The main entrance sign also tells you the platform ('binario', contracted to 'bin') number.
Use the official Italian railway website in English to find train times, details and fares:
Use 'Firenze' if you decide to go from Florence.
If part of your train journey includes a high-speed Freccia train (unlikely on this route, but possible depending on departure station and time) it is worth buying tickets in advance online through the Trenitalia site: online advance fares usually offer very good savings.
Otherwise you can just buy tickets at the station on the day you travel or a day or so beforehand if you prefer. Ticket machines are very easy to use, have English language options and the machines accept both cash (they give change) and cards (some are card-only...just check the icons at the top of the machine).
If you buy Regionale or Regionale Veloce tickets (the most common trains on this route) remember to 'validate' (date & time stamp) the ticket before you board. Validation machines are normally green& white, though some older yellow ones may still be around. You'll find them at platform entrances and on the platforms. Validation does matter...there are automatic fines for non-validation and inspectors do check.
Mentioned in this answer:
La Spezia is a good place to catch the train to the Cinque Terre. That's probably the most efficient way to go.
However, approaching the five villages by boat gives you views from the sea which you can't get by train. I believe the views from the sea are memorable and something you can't get from the train. This photo of Riomaggiore is a good example
Drive to Portovenere and you will find a boat that leaves from there and drops off & picks up from the nearby Cinque Terre towns. Buy a return ticket and visit the towns from the sea.
Portovenere itself is a lovely town and worth a visit or a stay.