We had budget surpluses in the 90s, what happened?
The reason why we had a tax surplus is because the largest demographic (the baby boomers) were in their 50s, at their most productive and spending more money (on housing and cars) than they ever would. That stimulated the consumer economy and fueled growth. We also had the raise of new technologies (the PC and Internet industry) that drove growth. The massive spending on the part of baby boomers lead to a great influx in tax revenue. Doing this time, the U.S. government didn't have a significant population drawing from the social programs.
When the baby boomers entered their 60s, they began to cut back in spending. This meant that baby boomers stop buying bigger houses. And while doing so, more of them started to draw from the social programs. You couple that will the raise of globalization and the de-industrialization of America and you have a massive economic downturn.