What EU wanted to force Cyprus to do is to break the insurance contract the government has with the bank depositors. The parliament rightfully refused, and it didn't pass.
In the EU, and Cyprus as part of it, all bank deposits are insured up to 100,000EUR by the government. This is similar to the US FDIC insurance. Thus, requiring the "small" (up to 100K) depositors to participate in the bank reorganization means that the government breaks its word to people, and effectively defaults. That is exactly what the Cyprus government wanted to avoid, the default, so I can't understand why the idea even came up.
Depositors of more than 100k are not guaranteed against bank failures, and indeed - in Cyprus these depositors will get "haircuts". But before them, first come shareholders and bondholders who would be completely wiped out. Thus, first and foremost, those who failed (the bank owners) will be the first to pay the price.
However, governments can default. This happened in many places, for example in Russia in the 90's, in Argentina in 2000's (and in fact numerous times during the last century), the US in the 1930's, and many other examples - you can see a list in Wikipedia.
When government defaults on its debts, it will not pay some or all of them, and its currency may also be devaluated. For example, in Russia in 1998 the currency lost 70% of its value against the USD within months, and much of the cash at hands of the public became worthless overnight. In the US in 1933 the President issued an executive order forbidding private citizens keeping gold and silver bullions and coins, which resulted in dollar devaluation by about 30% and investors in precious metals losing large amounts of money. The executive order requiring surrender of the Treasury gold certificates is in fact the government's failure to pay on these obligations.
While the US or Russia control their own currency, European countries don't and cannot devaluate the currency as they wish in order to ease their debts. Thus in Euro-zone the devaluation solutions taken by Russia and the US are not possible. Cyprus cannot devaluate its currency, and even if it could - its external debt would not likely to be denominated in it (actually, Russian debt isn't denominated in Rubles, that's why they forced restructuring of their own debt, but devaluating the currency helped raising the money from the citizens similarly to the US seizing the gold in 1930's). Thus, in case of Cyprus or other Euro-zone countries, direct taxes is the only way to raise money from the citizens.
So if you're in a country that controls its own currency (such as the US, Russia, Argentina, etc) and especially if the debt is denominated in that currency (mainly the US) - you should be worried more of inflation than taxes. But if you're in the Euro-zone and your country is in troubles (which is almost any country in the zone) - you can expect taxes. How to avoid that? Deal with your elected officials and have them fix your economy, but know that you can't just "erase" the debt through inflation as the Americans can (and will), someone will have to pay.