Hi alio,
Buses are fine & very cheap, when I was there last I went to Bourgas, Nessebar & Varna by bus with no problems. No railway station in Sunny Beach, as far as I recall, but there is one in Bourgas.
Just be aware that the presence of relatively 'rich' tourists attracts pickpockets to the resorts, some of whom target said tourists on public transport and elsewhere - so keep your valuables safe.