Croatia has very good train connections with most of European countries. Getting to Croatia by train is maybe a slower way of reaching your destination on the Adriatic Coast, however the bonus is you'll manage to avoid the summer crowds which accompany bus and car routes.
Good website for more information on international train timetables is DB Bahn, to which Croatian Railways website directly connects to as well.
Although train network is not as extensive as the bus one, it's a rather popular mode of transport in Croatia, especially since the tilted trains were introduced few years ago and considerably reduced journey length.
Central spot is Zagreb Main Terminal from where you can reach the most popular coastal destinations – Rijeka, Zadar, Šibenik and Split – in about 6 hours or less, depending on your chosen destination and whether you have opted for a direct or an indirect route.
Keep in mind that Dubrovnik can't be reached by train. However, once in Split you can easily switch to bus or ferry transport which will take you to Dubrovnik (both are real close to the train station, 2 minutes walk approximately).
For more information on timetables for destinations of your choice please visit Croatian Railways website. As far as tickets are concerned, you can reserve and buy them at any train station in Croatia. However, you still can't book or buy them online.
Length of journey for popular destinations in Croatia: