Ok, so that really depends. Let’s start by talking about the equipment in service on American Passenger Trains.
Passenger trains like airplanes today were divided by class. 1st class passengers traveled in Pullman Cars, owned and operated by the Pullman Company, complete with Pullman Conductor, and Pullman Porters and possibly chefs. They Pullman Conductor was fully responsible for the operation of the Pullman Cars and collection of tickets in those cars. Meanwhile the railroad’s conductor would collect tickets and be responsible for the overall operation of the entire train.
Pullman cars could be anything from a Parlor Car up to a fully private car. The most common car was the 12-1 Standard Sleeping car. This car had one drawing room and twelve sections. Drawing Rooms were the highest level accommodations offered by Pullman. Sections were the lowest sleeping car accommodation.
For more on sleeping car accommodations and their evolution have a look here:
http://www.railswest.com/pullman.html
Pullman would go on to add about a dozen different types of accommodations over the years. But beneath Pullman cars were coaches. In later years these would be broken up between coaches and chair cars. The difference being being coaches would have the walk over seats and usually higher capacity versus chair cars had more bucket type seats, most famously the Heywood-Wakefield Sleepy Hollow seats in the post war era. Usually the faster trains, the so called crack-varnish, would have the nicer equipment. Which factor in the next item to consider, the train.
On busier railroads there could be many passenger trains running between many different places. Unlike flying, trains really aren’t based on end city pairs, but all city pairs the trains stopped in.
The lowest passenger train was the mixed train. Mixed trains usually ran a round trip on a route once a day or every other day (usually not on Sundays at all). They were usually a coach on the back of a freight train, but some times passengers were simply handled in the caboose. These trains were slow. They didn’t exactly run on high speed lines, and they would stop and work industries in every town along the line picking up and setting out freight cars. The schedule of mixed trains were more like educated guesses.
Next up would be the local mail train. These trains were primarily used to deliver mail to smaller communities along the line. They shouldn’t be confused with Mail and Express trains which were usually faster mail trains, that didn’t carry passengers. These were all passenger trains, and they might carry sleeping and dining cars, though dining cars in 1916 were still a somewhat new concept. These trains might operate between city pairs like Denver and Chicago. While the top trains might make that run in 1916 in 24 hours, the local mail trains might do it 40. They usually as I said wouldn’t have a dining car, instead they would periodically stop at stations with cafeterias where passengers could detrain and buy food, before continuing their journey.
The Harvey Houses are a whole different story, but worth telling another time. For more on Fred Harvey and his Company, check out Wikipedia as a good primer.
Another type of train in the mix similar to these are commuter trains. These train were the direct predecessors to MBTA, MTA, New Jersey Transit, SEPTA, and others. I’m not really going to dwell on these. I think that concept is generally well understood.
Next are your standard passenger trains. They made fewer stops than the lesser trains, usually ran at higher speeds and carried sleeping cars in most instances when operating overnight, or parlor cars during the day. They may or may not carry diners.
Above them was the crack varnish, the top trains, these ran on the fastest schedules with the best equipment and the nicest accommodations. These trains like the Broadway Limited, 20th Century Limited, and in later years the Super Chief. They were called the crack varnish because of the very highly polished wood used extensively in their interiors by Pullman. These trains might not carry any coaches at all and had extra amenities. Sometimes they had surcharge just to travel on them.
So the problem with your question is could the average American afford to travel by train. Yes most could afford a train trip. But how far they needed to go and what level of comfort that travel would be in, could vary wildly. In addition to that there were some occupations that required travel. Traveling salesmen would frequently travel in 14 section cars. Government employees could travel in sleeping cars overnight on the government’s dime but only in sections. This rule persisted up until Amtrak in 1971, and kept some of the old standard (also called heavyweight) cars in service right up to the start of Amtrak.
Prices got higher for the nicer accommodations, and for the faster trains. Booking the Master Room on the 1938 edition of the Broadway Limited would have been like booking the suite on an Emirates A380. There would have been a rail fare, accommodation charge, and the extra fare for traveling on the Broadway Limited that would have cover the cost of the on board barber and secretary. Food in the dining cars was not included in the ticket price and was sold separately as was alcohol and cigarettes in the lounge car.
In the end, most could afford a coach day trip, maybe a shorter parlor day trip. Middle class might be able to afford an overnight round trip in a section.
Here is a sample list of fares from 1939 on Chicago and Northwestern Railroad:
http://www.streamlinerschedules.com/tickets/cnw193901.pdf
The average salary in 1940 was about $1400.
https://www.archives.gov/publications/prologue/2012/spring/1940.html
Almost everyone could afford to travel by train on some level, but how far and how often would vary wildly, as would the level of comfort.