Pennsylvania is called "The Keystone State" because it has been a key part in the political, economic and social development of the nation. Three of the most important documents in U.S. history were written in Pennsylvania: the Constitution, Declaration of Independence and Gettysburg Address.
The word "keystone" is an architecture term used to describe a wedge-shaped stone inside of an arch responsible for holding the other stones in place.
Pennsylvania also gets its nickname from being located in the middle of the 13 original colonies. In the Pennsylvania state song, there is mention of the nickname in the line, "Birthplace of a mighty nation, Keystone of the land."