You can of course, if you wish, take the little tourist “trains” that run through the streets of Sunny Beach. But be warned, each of them runs a relatively short route, and it costs 2 leva a leg. And what they lack in suspension they more than make up for in speed.
Better to use the real buses on the main road through the resort. They run quarter hourly from Sunny Beach to Sv. Vlas from 0600 to 2400 or so, and a ticket costs 0.90 lev. You just ask for the number of tickets you want, not where you want to go. SB to Nesabur is 0.70lev.
Also you have fairly regular services to Elenite, Kosharitsa, and so on.
From the bus station, there’s buses to Varna, Burgas, Sozopol, Sliven, and even direct to Sofia. Which is maybe not surprising in retrospect.
And there are many other buses whizzing around, including free ones to and from the water parks, tour operators, etc.
[Posted under the “late but why not” rule]