The two main causes of railroad growth in the United States during this time were the Civil War and advances in technology.
The Civil War helped bring about growth in American railroads largely because it made it easier for Congress to pass a law authorizing the building of a transcontinental railroad. The Southern states had been opposed to the building of federally funded railroads. When the South seceded, the Southern states were no longer represented in Congress and could not block the law. The Pacific Railway Act was passed in 1862, opening the door for the federal government to subsidize railroad construction. This contributed greatly to the expansion of American railroads.
The other major cause of railroad growth was technological. The most important technological breakthrough was the invention of the Bessemer process. This new process allowed steel to be made more quickly and at a lower cost than ever before. This made it much more possible to afford all of the rails and all of the train cars needed to greatly expand the American rail system.
Once the Civil War removed political opposition to railroad expansion and the Bessemer process and other innovations made expansion cheaper and easier, it was possible for the American railroads to expand rapidly in the second half of the 19th century.