Countries have reasons to let their currencies become devalued, and sometimes those reasons are out of the hands of government policymakers entirely. In modern economics, most currencies are what are called “fiat currencies” and they derive value based on the policies that the governments who create them make.
This means the market value is a variable dependent on the policies of the moment. One example of such policies is when a country holds its currency value relative to that of a larger, more established country like the United States.
Currency devaluation in modern markets really hurts investor confidence. For one, access to information occurs in real time so investors are well aware when the signs of devaluation occur. Speculators will sell first, which puts pressure on the country in question to move forward on a devaluation officially.
One way to look at when a crisis is occurring is to look at real exchange value relative to the nominal exchange rate. If the real rate depreciates and falls below the nominal rate, a crisis has occurred. However, countries might try to hide their real value in order to stave off a crisis. This occurred most recently in Greece.
Speculators with imperfect information can actually accelerate inflation and devaluation. This happened in 1994, just after NAFTA was signed. Mexico benefitted greatly from access to foreign capital, but political uncertainty in the region hurt the value of the peso. As a result, speculators pulled out and the economy tanked.