It's not just the banks. Cyprus has a huge public debt[1].
The measure is also not the first of its kind in the EU - Italy did it in 1992 to cover a financial emergency. They took "only" 0.6% from all bank accounts back then.
[1] http://www.cyprus-mail.com/cyprus/highest-annual-increase-go...