The US Dollar is often viewed as a safe haven currency. It is still the world's reserve currency and the thinking is that if the dollar goes bust the rest of the world will be in an even worse situation.
Therefore, during the worst of the economic turmoil, the dollar remained relatively strong because investors preferred to have the security of US dollar assets (e.g. US Treasury bills) With the global economy reaching new lows, investors became nervous about any type of risk, therefore, the US dollar benefited.
With the sign of 'green shoots of recovery', markets are regaining a small appetite for risk and so are looking to diversify away from the dollar. Currencies like the Canadian Dollar and Australian dollar are likely to benefit from an economic recovery. This is because an economic recovery will cause commodity prices to rise from their current lows. In turn, higher commodity prices will help increase the value of Canadian and Australian exports making the currency stronger.
Therefore, the dollar has been weakening because investors are seeking to diversify away from just the security of dollar.
There are of course many other factors affecting the dollar. A US economic recovery may enable interest rates to rise, making it attractive to hold dollars.
On the other hand, many argue the green shoots of recovery are still very feeble and the optimism could be misplaced. With the unemployment on the rise, economic stagnation could persist.
In the longer term, the value of the dollar will depend on the effect of the government's growing budget deficit and policies of quantitative easing. Whilst deflation may be more likely than inflation in current climate, the increase in the money supply, leaves the potential for inflation and a develuaing dollar in the future. (potential of US dollar collapse)