Reference: Fataawa Noor ‘alad-Darb – Question No.6336, Page 173, Volume 12
Question: Is it permissible to supplicate for an openly immoral sinner (faasiq), [someone] who does not fulfill his religious obligations?
Response: Supplicating for the guidance of a faasiq – that Allaah guide him and rectifies his affair is something which is legislated and recommended.
As for supplicating for him with a supplication which could possibly aid him upon his immoral sinning and prolong him upon falsehood, then that is not permissible. As for supplicating for his forgiveness and mercy after his death, then this is permissible – rather legislated. It is hoped that Allaah (Ta’aala) will respond to this supplication, as has been mentioned in the hadeeth where the Prophet ﷺ said: