Praise be to Allah.
Depositing money in the bank in return for interest is riba (usury), which is a major sin. Allaah says (interpretation of the meaning):
“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.
279. 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)” [al-Baqarah 2:278-279]
If a Muslim is forced to put his money in the bank, because he cannot find any other means of keeping his money safe apart from putting it in the bank, then there is no sin in that, in sha Allaah, subject to two conditions:
1-That he does not take any interest in return
It is not permissible to make use of the interest (riba) which the banks pay to their customers. They must get rid of it by donating it to charitable causes.
The Scholars of the Standing Committee for Issuing Fatwas said:
The interest which the banks pay to depositors on the money that they deposit in them is regarded as riba (usury). It is not permissible to make use of this interest, and the customer must repent to Allaah from depositing his money in riba-based 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. Fataawa Islamiyyah, 2/404
And Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) said:
With regard to the interest that the bank gives to you, do not give it back to the bank and do not keep it, rather spend it on charitable causes such as giving it to the poor, renovating public washrooms, helping debtors who are unable to pay off their loans, etc. Fataawa Islamiyyah, 2/407
And Allaah knows best.