What is haraam is that which has been forbidden by Allaah and His Messenger, and what is halaal is that which has been permitted by Allaah and His Messenger.
Riba is haraam according to the Qur’aan, the Sunnah and the consensus of the ummah. Every institution or bank which is based on riba is subject to the declaration of war from Allaah and His Messenger, whether it is in a Muslim state or a kaafir state. 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.
And if you do not do it, then take a notice of war from Allaah and His Messenger”
The fact that governments approve of the riba-based banks should not be taken as proof that these banks are permitted. The Prophet (peace and blessings of Allaah be upon him) has told us that there will come a time when the people will permit that which Allaah has forbidden, such as adultery, alcohol and musical instruments. That does not mean that these haraam things will become permissible thereby.
The scholars have issued many warnings against these banks, and issued many fatwas stating that it is haraam to work in them without paying any attention to the fact that they are allowed by the state. They have often advised the governments of Muslim countries to ban these riba-based banks.
It says in Fataawa al-Lajnah al-Daa’imah (15/51):
“Riba is haraam according to the Qur’aan, the Sunnah and scholarly consensus… working in banks that deal with riba is haraam… The fact that the government may approve of them or allow them to open banks or remains silent about that does not mean that it is permissible for the Muslim to deal with them. It is not permissible to work in these banks because the government does not possess legislative authority; rather legislative authority belongs to Allaah alone in His holy Book, or the Revelation that He sent to His Messenger (peace and blessings of Allaah be upon him).”
And it also says (15/55):
“Working in banks that deal with riba is haraam, whether that is in a Muslim state or in a kaafir state, because it involves cooperating in sin and transgression, which Allaah has forbidden as He says (interpretation of the meaning):
“Help you one another in Al‑Birr and At‑Taqwa (virtue, righteousness and piety); but do not help one another in sin and transgression”
Shaykh Ibn Baaz said, after quoting some of the evidence from the Qur’aan and Sunnah that riba is haraam:
“This is some of the evidence from the Book of Allaah and the Sunnah of His Messenger (peace and blessings of Allaah be upon him) which explains that riba is haraam and the danger that it poses to the individual and to the ummah. Whoever deals in it enters into a state of war against Allaah and His Messenger. My advice to every Muslim is to be content with that which Allaah and His Messenger have permitted and to refrain from that which Allaah and His Messenger have forbidden. What Allaah has permitted is sufficient so that we have no need of that which Allaah has forbidden. We should not be deceived by the large number of riba-based banks and the spread of their dealings in every place. Many people no longer care about Islamic rulings, rather they care about making money by any means. That is only because of their weakness of faith and lack of fear of Allaah, and because of their love for this world. We ask Allaah to keep us safe and sound.”
Majallat al-Bukhooth al-Islamiyyah, 6/310
And Allaah knows best.