No train station in St. Tropez, so I guess it's bus, rental car or boat.
May isn't peak season on the Riviera unless you hit some sort of special event, but I don't know whether you can find something in your price range in St.-Tropez. I managed to do it in Nice last May, but I only needed a single room, and I suspect hotel rates are lower in Nice. I'd check booking.com to see how prices look. If you find some likely-looking possibilities you can use to Google to locate their individual websites, where you might save a bit of money or get a continental breakfast thrown in for free.