Undoubtedly it is the husband’s obligation to spend on his wife and to do his duty towards her and give her all her rights. If he fails her and falls short in his duties towards her, or he causes her harm, then she has the right to demand separation, i.e., divorce. But before that she has to ask him to spend on her and provide her with accommodation, because Allaah says (interpretation of the meaning):
“Lodge them (the divorced women) where you dwell, according to your means” [al-Talaaq 65:6]
“Let the rich man spend according to his means; and the man whose resources are restricted, let him spend according to what Allaah has given him. Allaah puts no burden on any person beyond what He has given him”[al-Talaaq 65:7]
And he has to live with her honourably. Allaah says (interpretation of the meaning):
“and live with them honourably”[al-Nisaa’ 4:19]
If her husband gives her her rights as prescribed in sharee’ah, then it is haraam for her to ask for divorce, because the Prophet (peace and blessings of Allaah be upon him) said: “Any woman who asks for divorce when there is no reason, the fragrance of Paradise will be forbidden to her.” But if she is being harmed, and the situation is too much for her to bear, and he is not spending enough on her or he is not giving her her rights, then she has the right to ask for a divorce. She should go to the qaadi and explain the situation to him, and he in turn should ask the husband to give her her rights or to divorce her.