Definitely the Naples-Rome segment of the Pompeii-Rome trip. You'll want to be on one of the fast trains, and those tickets are cheaper early on. If you check the fare for your travel date and see that it's the same as the fare for tomorrow, there's no particular reason to buy at this point. That would mean you've missed out on all the bargain tickets. That's a technique you can use for determining whether there's an advantage to buying tickets early. Some trains (usually the not-fast ones) have fixed fares that don't change, so there's no need to rush to buy tickets. Faster trains often require seat reservations, and that adds an extra wrinkle: the possibility of a sell-out. That doesn't normally happen very far in advance, but I've definitely seen "Train full" labels for trains on the AVE line between Barcelona and Seville.
For La Spezia-Florence you have a choice. There are many regional trains (67 to 87 minutes, roughly) at a flat cost of 7.90 euros. Those you don't buy ahead of time. There are also Intercity Trains (54 to 60 minutes) at a maximum fare of 11.00 euros. Those are demand-sensitive, and you might save a bit of money by buying early--probably not enough to risk losing your money if your trip gets canceled or rescheduled; it would also tie you to a specific departure time. The final choice is the very fast Freccia trains, whose fares go at least up to 12.90 euros but can be a good bit less if you buy your ticket early. Again, you have to decide whether the modest savings on a short trip like this make it worthwhile to buy the ticket early and tie yourself to a specific departure time. In addition, there aren't all that many Freccia trains on this route, so you may not find one with a departure time that meets your needs.
For the Pisa-Florence trip, it appears that all the trains are regionals, so those are not tickets to buy in advance. However, travel time varies a lot because some regionals make a lot of stops, and on some departures there's even a change required. So this is a place to choose carefully.
In Italy, do not ever show up at a train station 10 minutes before departure time, planning to buy your ticket from a staffed counter. You may well still be standing in line after the train departs. The ticket machines have worked fine for me, but I cannot give you a 100% guarantee that any particular US credit card won't have issues. It's not a bad idea to buy your train tickets earlier in the day or the day before if you have a convenient opportunity to do so. The warning about potential hang-ups at staffed counters applies in other countries, too; most of the people are in those lines because they need complicated tickets, so each transaction takes quite some time. Some combination of the Italian ticket sellers' operational procedures and the technology available to them makes for a very frustrating situation. There doesn't seem to be any sense of "We need to get these people through the line because there's a train due to depart soon."
For your trips in and out of Ronda, I think it depends on what departure you want to take. If part of the trip is on an AVE/AVANT/AVLO fast train (possible between Ronda and Seville, at least), that fare can vary. If the entire trip is on a slow train, there's no rush.
Do not under any circumstances plan to buy a long-distance ticket from the staffed counter at Madrid's Atocha Station. That is a multi-hour nightmare.
I am not knowledgeable about German trains, but I do know there are some excellent deals on regional tickets. I don't know whether they'd come into play on either of those German trips, but if no one provides information in this thread, you should ask specifically about the German trips in the Germany forum. There are experts there who will be able to help you easily.