A believer must be aware of the fact that depositing money in the bank in return of riba ie. Interest(usury) is a major sin and very derogatory in the sight of Allah. Allaah says in holy Quran:
“O you who believe! Be afraid of Allaah and give up what remains (due to you) from Ribaa (from now onward) if you are (really) believers.
And if you do not do it, then take a notice of war from Allaah and His Messenger but if you repent, you shall have your capital sums. Deal not unjustly (by asking more than your capital sums), and you shall not be dealt with unjustly (by receiving less than your capital sums)”
However if there is no other option and a person is forced to put his money in the bank either because there is no other safe place or because of the need of the time and certain laws of the country that makes it impossible for him to avoid banking then there is no sin for him as long as these two conditions are met.
1. He does not take any interest in return. He has to keep his conscience clear and avoid anything that may harm his hereafter and duniya as well.
2. That the bank does not deal only with interest, rather it should have some other activities that are permissible in which it invests the money deposited.
For a muslim it is not permissible to make use of any riba which the bank pays. A muslim must rid it by donating it to the charitable causes.
The interest that the depositor gets from the bank is regarded as riba or usury. It is not permissible to use this money on personal grounds. A muslim depositor should repent to Allah from depositing money in such banks. He should withdraw the money that he deposited and the interest, keep the original amount and donate the extra to charity, to the poor and needy or for renovating public facilities etc.
Do not give it back to the bank when you can easily use it to help the poor and needy such as giving it to the poor, renovating public washrooms, helping debtors who are unable to pay off their loans, etc.
And Allaah knows best.
May Allah keep us from all evil.