[Ref: Muwatta Malik, chapter 29, Hadeeth 82]
Note: this is from the blessings of this religion that a marriage enforces certain obligations upon the husband and wives. Among the obligations that are handed over the husband is the obligation to provide for his wife that covers her basic necessities based on the era and land and place she is living in. So he is to provide for her acceptable food, clothing, shelter and medication and other basic necessities. Note this does not in any way mean that he is obliged to take her on expensive tours, or buy her jewellery no. These are voluntary and rewarding but not obligatory upon someone who cannot afford it with ease. Islam is just and moderate. It does not obligate something beyond one's task so basic necessitates do not include weekend shopping, sky diving and what have you.
So a wife can be separated/divorced from his husband by the ruler or the leader if he sees that the husband is either good for nothing or he is unable to spend on her . The ruler may also take other steps such as help the man find a good source of income or give him charity for a few months until he is stable. All of this is from the rights of the women and the overall welfare of the society which Islamic law stipulates.
Allah said: "Men are in charge of women by [right of] what Allah has given one over the other and what they spend [for maintenance] from their wealth..." [Qur'an 4:34 ]
Imam Al Qurtubi al-Andalusi (rahimahullah) said:
فَهِم العلماء من قوله تعالى: { وَبِمَآ أَنْفَقُواْ مِنْ أَمْوَالِهِمْ } أنه متى عجز عن نفقتها لم يكن قوّاماً عليها، وإذا لم يكن قَوّاماً عليها كان لها فسخ العقد؛ لزوال المقصود الذي شُرع لأجله النكاح. وفيه دلالة واضحةٌ من هذا الوجه على ثبوت فسخ النكاح عند الإعسار بالنفقة والكسوة؛ وهو مذهب مالك والشافعي. وقال أبو حنيفة؛ لا يفسخ؛ لقوله تعالى:
{ وَإِن كَانَ ذُو عُسْرَةٍ فَنَظِرَةٌ إِلَىٰ مَيْسَرَةٍ }
[البقرة: 280] وقد تقدّم القول في هذا في هذه السورة.
The scholars understood from the verse "and what they spend [for maintenance] from their wealth". If a Man who is unable to spend on her then he is not "Qawwam" (In charge) of her. And when he is not "Qawwam" on her then it is allowed for her to terminate the contract, because the aim of marriage is not fulfilled due to which Nikah is prescribed. This verse is the evidence of terminating the nikah when one is unable to spend on maintenance. This is the saying of Imam Malik and ash-Shafiee, but Imam Abu Hanifa said: Nikah should not be terminated because Allah says: "And if someone is in hardship, then [let there be] postponement until [a time of] ease." (al Baqarah verse 280) The tafsir on this verse is already mentioned before .
[Tafsir al Qurtubi under 4:34; Translated by Asim ul-Haq]