Inflation is good for the economy primarily because it is an incentive to invest. If inflation is occurring, then keeping your holdings in cash is a net loser; 5% inflation means that in a year, your $100 is now worth $95.24 (1/1.05), so unless you're getting really good interest, that's a bad thing. On the other hand, if you invested that $100 in a business, you can outgain inflation more easily since inflation should drive the business's profits.
Deflation (negative inflation), on the other hand, is bad for investing because it encourages holding cash. If deflation of 5% occurs, then you can get a 5% ROI by simply holding onto twenty dollar bills; why would you invest in a business that was in a deflationary economy (and thus would likely earn less money)?
Mild inflation also increases flexibility in the economy, because businesses make a little more money (in terms of denominated money); that allows them more flexibility in expansion. Salaries for some also go up, meaning that spending goes up, and often with more flexibility in how those salaries are spent; inflation doesn't hit all sectors exactly the same, so often this leaves significant portions of the middle class with more money to spend (and thus driving economic growth).
More than salary growth, though, inflation seems to drive job creation. From the New York Times, this article quotes a paper by George Akerloff which shows that job creation tends to be more significant than rising salaries during periods of low inflation (ie, what we're talking about here). Salary increases will come here largely from job seeking rather than raises, because businesses don't tend to cut wages and thus are reticent to significantly raise salaries; they'd rather just hire more people, and then cut jobs when the economy weakens (or inflation drops). This is even more true in low wage jobs, such as minimum wage positions, where wages cannot be cut but salary increases have little real effect on job retention; it's easier to change the number of hours for PT employees, or the number of PT/FT employees.
Deflation, on the other hand, leads to decreased flexibility, layoffs, and lower consumer spending. While it sounds good to say 'hey, prices are going down!' to your average consumer, you have to keep in mind that those prices are what keep the businesses going that drive our economy and pay your salary (either directly or indirectly). If your employer started making 5% less per year, do you think they'd keep you employed? Maybe not, and at the bottom (service industries, fast food restaurants, grocers, etc.) there would be significant cutbacks if deflation hit them.
I would note that 5% inflation is probably a bit high; most economists like 2% to 3%, and the Federal Reserve has said that 2% is the right target. They're mostly concerned with avoiding deflation, as that's a big risk to the economy; the advantages of mild inflation are relatively minor, compared to the damages of deflation, and tend to be more correlations (you get mild inflation in a good economy, as much or more than you need mild inflation for a good economy).
Most important, probably, is consistent inflation. Consumers and businesses can act rationally if the inflation rate is relatively stable and predictable. When inflation jumps or drops, it changes the potential outcomes for choices made by investors, consumers, and businesses, meaning choices they made in the past are now suboptimal; if the inflation rate is jumping around (1% one year, 4% another, -1% the next) investors, businesses, and consumers will be relatively conservative in their choices, which leads to a bad economy.