There is a bus from Nice to St. Tropez that leaves from the Nice airport and stops by St. Raphael. Then you have to switch buses to St. Tropez. It takes about 3 hours. The big problem with getting to St. Tropez by road any time in the summer is that the last few kilometers from Port-Grimaud can take as long as the whole trip from Nice to that point. The only way to avoid that is to arrive VERY early in the morning or quite late in the evening. The bus leaves Nice Airport at 9, 12.30, 15.45 and 19.30 - so a long wait if you miss one!
Have you thought of doing it by boat?
http://www.trans-cote-azur.com/an/stropez_nice .html
Boats leave Nice at 9am arrive St Tropez 11.30. Leave St Tropez 4.30pm arrive Nice 7pm.
In July and August they operate everyday except Mondays and in September they run on Tuesday, Thursday and Sunday. Tuesday and Saturday are market days in St Tropez. It looks like it is �50 return.
Or Take the train from Nice to St Raphael. You can check out the train times online on
http://sncf.com -> TER -> Provence Alpes Cote -> Depart Nice Ville (zip is 06000), Arriv�e St Raphael (zip is 83700).
You don't have to reserve your train ahead of time, though it's best if you're taking the fast TGV, travel during busier times, or if you qualify for discounts.
The train station in St Raphael is a 10 minute pleasant walk to the beach area and ferry boat port (in front of city's Casino).
Take the ferry boat across the 13 nautical miles from St Raphael to St Tropez. In the summer, the coastal road from St Raphael to St Tropez can resemble a parking lot so I don't recommend the bus until after the end of August. Check out the St Raphael ferry boat schedule here: