I'm going to assume you're not coming to Saint-Tropez via private boat or helicopter which are far and away the easiest ways to access this glamorous Riviera town. Otherwise, our main goal is to avoid the traffic jams for which Saint-Tropez is legendary.
This is a difficult problem because the only roads into Saint-Tropez are two-lane departmental roads that stretch for a minimum of 45km before linking to the A8 autoroute. I can promise you that, in the summer season, it will be the longest 45km of your life. Even off-season and off-hours count on at least an hour in slow-moving traffic. Let's look at driving to Saint-Tropez in detail before moving on to the virtues of train, bus and boat.
Get a great deal on car rentals: Guaranteed lowest prices
Standard Route
On the A8 autoroute (from Nice or Marseille), take exit 36 (Draguignan, St-Tropez) and then D125, D25, D559 and N98A for 45km to Saint-Tropez.
Alternate Route
On the A8 autoroute (from Nice or Marseille), take exit 35 (Le Muy) and then the D558 via La Garde Freinet , approaching Saint-Tropez via the N98. This road tends to be slightly less clogged than the standard route.
There's no train station in Saint-Tropez. The nearest train station is in Saint-Raphael which is on the rail line running between Italy, Nice and Toulon. See a Riviera train map for all stops. From the Saint-Raphakl bus station (right behind the train station) there are regular buses (line 7601) to the Saint-Tropez bus station which take 1 1/4 hours. See VarLib for the schedules.
VarLib also runs daily buses from Toulon to Saint-Tropez via Hyeres and Cogolin (1 3/4 hours) and from Hyeres Airport stopping at Le Lavandou to Saint-Tropez (1 1/2 hours).
From Sainte Maxime, Les Issambres, Port Grimaud and Les Marines de Cogolin BateauxVerts runs daily shuttle boats to Saint Tropez. Bear in mind that these small towns (especially Ste Maxime) get their fair share of summer traffic as well.
From the port of Saint-Raphael, BateauxSaintRaphael runs daily boats to Saint-Tropez from April to October (one hour, €25 return).
From Nice TransCoteAzur runs day trips to Saint-Tropez from June through September (€61). It's a long day (9am to 7pm) with five hours in Saint-Tropez but is certainly guaranteed traffic-free!
View Gulf of Saint-Tropez in a larger map