A coastal train has dedicated stops, with settlements gathering around the important station. Travellers wait together at the station, an automatic community. Arrive 5 minutes late and the train is gone, the event over.
A coastal highway is a continuous strip. A few more miles is almost as easy to get to as right here. And so development tends to spread outward from the road, concentrated around a line rather than a point. And it's easy to leave now, or in 10 minutes, or in 10 hours.
A train arrives on schedule. Cars might arrive early, or late, or perhaps never.
Choose the primary type of transportation, and the community will follow.