Can You Pray Istikharah for Divorce?
Question

Is it permissible to pray Istikharah concerning the issue of divorce?
Praise be to Allah.When to pray Istikharah?
It is prescribed to pray Istikharah concerning permissible matters or when choosing between recommended matters. With regard to things that are obligatory, recommended, prohibited or disliked, it is not prescribed to pray Istikharah concerning them . 
It says in Al-Mawsu`ah Al-Fiqhiyyah, 3/243: 
“There is no room for Istikharah with regard to matters that are obligatory, prohibited or disliked. Rather it applies to things that are recommended and permissible. And with regard to recommended matters, Istikharah should not be done to decide whether to do them or not, because they are recommended. Rather it should be done when there is a conflict, i.e., when there are two conflicting matters and one does not know which one to start with or limit himself to. With regard to permissible matters, one may pray Istikharah when deciding whether to do them at all.”
Can You Do Istikharah for Divorce?
With regard to divorcing a woman, it may come under one of five rulings. 
It says in Zad Al-Mustaqni`: “Divorce is permissible in case of necessity and is disliked when there is no such need. It is recommended in the case of harm, obligatory in the case of Ila’ (an oath to refrain from marital intimacy) and prohibited in the case of Bid`ah (innovation).” 
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said: “The phrase “Divorce is permissible in case of necessity” means if the husband needs to do that, then it is permissible for him, such as if he cannot be patient with his wife. If there is a need for that, it is permissible for him to divorce her…” (Ash-Sharh Al-Mumti`, 13/8) 
In this case, before divorcing her it is recommended for the man to pray Istikharah , asking Allah to guide him. But if things are going smoothly, it is not prescribed for him to pray Istikharah , because in this case divorce is disliked. 
Similarly, if divorce has become obligatory for him, it is not prescribed for him to pray Istikharah, such as if he has discovered that his wife is not chaste and has not repented. In that case it is obligatory for him to divorce her and not to keep her. 
Similarly, it is permissible for the wife to ask for a divorce if she has been harmed by her husband, such as if he does not spend on her maintenance, or if she dislikes him because of his bad attitude or weakness in his religious commitment and so on. In that case, it is recommended for her to pray Istikharah about asking for a divorce. But if things are going smoothly, it is prohibited for her to ask for a divorce, because the Prophet (blessings and peace of Allah be upon him) said: “Any woman who asks her husband for a divorce when it is not absolutely necessary, the fragrance of Paradise will be forbidden to her.” (Classed as authentic by Al-Albani in Sahih Abu Dawud) 
To sum up, it is prescribed for the husband to pray Istikharah about divorcing his wife if divorce is permissible. Similarly it is permissible for the wife to pray Istikharah about asking for a divorce, if doing so is because of a reason that makes it permissible for her to seek divorce. Apart from that, it is not prescribed to pray Istikharah about divorce.  
And Allah knows best.