So spending money when the economy is bad is better than spending money when the ecoomy is good? That doesn't make sense
During a period of growth, the economy is likely almost at full capacity, and is gorwing through increases in the aggregate supply curve. Government spending will cause an increase in demand, but because there isn't sufficient capacity in the economy all it will lead to in the end is inflation (output increases beyond capacity, meaning prices rise, meaning demand falls back to a level where the economy is at/close to capacity), meaning that all of that money was just wasted.
In a recession (which is caused by a fall in demand rather than capacity) you have all this spare capacity that isn't being used. So if aggregate demand is increased, you get a boost in output without suffering from inflation.
If the government is running a budget deficit, it's effectively looking to boost aggregate demand (via tax cuts/increased spending). When the economy is growing by itself and you're not suffering a significant slump in demand that is leaving tons of unused capacity, it makes no sense to do this and to try and stimulate the economy. Hence why budget deficit during growth = bad (as a general rule). However when you have the demand caused recession, the government running a budget deficit can help to end it.
Unfortunately wiki's economics section leaves a lot to be desired, but if you're interested the bottom of this link contains a (fairly poorly laid out) diagram demonstrating what typically happens with an increase in aggregate demand (inflation):
http://en.wikipedia.org/wiki/Aggregate_supply