Tony:
The railroads definitely played a key role, especially in the first great boom of golf course construction in the US from 1890 to 1900. If you look at the Harper's Reports from that era, the listing for each course (or club) is given with a notation of what railroad line you would take to get there and how far the course was from the depot. Golf in Florida was mainly a play by the railroads to draw northern tourists to the hotels they were building along their lines. There are pamphlets from that era describing the golf courses you could play along the major railroad lines throughout the country, including in Michigan. I bet if you overlaid the development of golf courses during that era with a railroad map, there would be a very high corollary.
The automobile seems to have become the method of transportation of choice as time went along. The Annual Reports from 1916-1931 no longer include the rail line notations, but would have notations such as "located 3 miles from town, accessible by automobile." Obviously, the increased options for getting to the course added to the growth of the game, as now courses could be built in remote locations and did not have to be in the center of town or just off the rail line. During the teens there were a series of golf automobile tours that were being touted, including a tour of New England.
Steve makes a great point about how the course/club became a predictable retreat in a time when change and "advancement" was prevalent. But I don't think that tells the whole picture. I keep going back to the small generic midwestern/plains state farm town as an example. Its not on the train line, there were probably only a handful of "well-to-do" people in the town and most likely you were dealing with a fairly homogeneous society. There was something about the game that fit with the American spirit/ethos/attitude at the time. Its some mix of an appreciation of leisure time (and what it represented), the desire to spend time outdoors, a spirit of taking on new challenges, the draw of a game where the challenge is against oneself and probably a myriad of other factors. Don't forget that the 20's were almost defined by the word "fad" and perhaps for a time golf was just that.
David makes a good point about the fun factor. There is something about the game that gave it staying power. I don't see a lot of jitterbugging or flagpole sitting going on these days, but people still play golf.
Sven