Trains are very efficient at moving things from one place to another - efficiency measured in amount of fuel required.
The limitations are that they require infrastructure (tracks) and they are most efficient the fewer stops they have (fewer points of embark/disembark).
So to make them viable in your story, the infrastructure needs to be cheap, fuel expensive, and having few points you need to connect or travel between. Building a separate transportation structure which does last mile delivery, and which can't easily replace trains will boost train usage.
The infrastructure is the difficult aspect of your water world, but if the world has shallow water between landmasses, trains on trestles over water will be faster and more efficient than boats.
So if you can design your world with shallow water, or peculiar landmasses that provide a place to put tracks (undersea ridges at continental plates - still below water, but shallow enough for tracks) then you may find that trains are a viable means of transportation of people and goods over large lakes and small oceans.
In these cases, though, ocean weather and waves become very important, and could result in some exciting scenes. Perhaps the trains may attach to the tracks more securely and are water shedding if not submarine, and perhaps the tracks are 10 meters above calm water so waves rarely reach the trains.