Purchasing in advance makes sense to purchase discounted tickets, which sell out quickly. Otherwise you can buy there. Trains never run out of seats. At most they (rarely) run out of second class seats for a train, and you have to wait for the next train half hour or one hour later if you don't want to pay for a higher level class. Higher class seats (first class or business) never sell out.
One warning about discounted tickets (economy or super economy). They aren't refundable, so if you miss the specific train you have reservation for you don't get your money back. It's lost and you have to buy a brand new ticket at the base (full fare) price.
Regional trains are commuter trains. No reservations and no discounts available for those trains.
ROMA-NAPOLI if you are absolutely sure of your travel plans, you can try to see if you can get a discounted ticket in this segment.
SIENA-MONTEROSSO Almost certainly all on regional trains (except for some Freccia Bianca or Intercity from Pisa to Spezia. Buy there. No discounts on regionali. Savings would be puny even if you take a Frecciabianca from Pisa to La Spezia.
MONTEROSSO-NICE: Take a look on Trenitalia.com, but I think it's mostly Regional trains, with changes in Genoa and Ventimiglia. Probably not worth to pre-purchase. Actually the best option with non stop service to Ventimiglia is on a Regionale Veloce (no discounts).
NICE-MILANO and MILANO VENEZIA. From Nice to Ventimiglia it's a Regional Express. No discounts. You could buy discounted tickets on Intercity from Ventimiglia to Milan or Frecciabianca from Milan to Venice. See if the savings justify locking yourself on a specific date and time.