Railroads transformed the US in many ways. Here are two of the most important ways in which they did so.
They helped to create a national economy for the US. They helped to tie places that could create goods (cattle ranches and mines in the West, for example) to the places where the goods would be processed and consumed. This allowed the country as a whole to become richer since any place in the continental US could trade with any other.
They also helped to industrialize the country. The need for things like thousands of miles of rails and all the cars to run on them led to a great demand for factories and industry. This transformed the US economy in a very important way.