Start with the route and timetable. Check how often trains run and whether an arrival leaves you enough time to reach your accommodation. For a longer journey, decide which stop is worth spending the night in and which is mainly a transfer.
Look at the distance from each station to the next place you need to be. Book the parts that depend on fixed times first and leave room for a delay. If you are connecting to a bus, ferry, or rental car, check the last departure as well as the one you expect to take.