Shakespeare wrote during the reign of Queen Elizabeth I, which we call the Elizabethan period. Prior to the Elizabeth period, England had been in a state of religious turmoil and financial decay. Elizabeth's father, King Henry VIII, had broken from the Catholic Church. As a consequence Catholic monasteries in England had been demolished, leaving many homeless. When Elizabeth's half-sister Queen Mary I ascended the throne, she re-instated the Catholic Church, leading to the persecution of anyone who sided with her late father's Protestant Church and a great deal of bloodshed. In addition, Queen Mary I married Spain's King Phillip II, who was at war with Italy, and Mary used England's royal treasury to fund Phillip's wars. Hence, when Queen Elizabeth ascended the throne, the English treasury was nearly broke, and many homeless and beggars wandered the streets.
Nevertheless, under Elizabeth, England's economic and social structure was able to recover. First, she put an end to all religious hostility. Then, she focused on stabilizing the economy. Under Elizabeth, due to Nicholas Hilliard's talents, the miniature portrait market began to thrive, along with the wool industry. There were also booms in the architectural and iron industries. New mining industries also began as tin and copper began to be mined in Cornwall and Cumberland respectively (Tennessee State University, Taylor, "Elizabethan Economy").
As England's economic and social well-being stabilized and prospered, the Renaissance era that flourished in Italy now also flourished in England, ushering in new desires for education, art, and culture and a new philosophical outlook. With more money, citizens had more financial ability and leisure to indulge in education, with an emphasis in studying science and a return to studying the Classics. A return to studying Greek and Roman Classics was especially made possible due to Elizabeth's stable break from the Roman Catholic Church; no longer were citizens forbidden to study the masterpieces of pagan Greek and Roman philosophers and writers.
The benefits of England's prosperity during the Renaissance especially shows up in Shakespeare's writings, which are full of historical, philosophical, and mythological references.