Question: Is seeking forgiveness for the believing men and the believing women obligatory?
Answer: Seeking forgiveness is obligatory:
1- For oneself; so the legally responsible person must seek forgiveness for himself.
2- For the parents, due to the right they have over the child: "and say, 'My Lord, have mercy upon them as they brought me up when I was small'" [Al-Isra’:24].
3- Seeking forgiveness for the Muslim deceased when his funeral prayer is performed over him.
As for seeking forgiveness for others besides those we mentioned, then it is recommended and legislated, and there is no evidence for its obligation. And His—Exalted is He—saying: "And ask forgiveness for your sin and for the believing men and the believing women" [Muhammad: 19]—it is an address to the Prophet (May Allah bless him and his family and grant them peace) when Allah—Exalted is He—commanded him to seek forgiveness; because his intercession with Allah is accepted, due to the tremendous honor and the lofty rank that he has; so the command came to the Prophet (May Allah bless him and his family and grant them peace) due to this particularity, and this particularity does not exist in other than him.
And His—Exalted is He—saying: "And those who came after them say, 'Our Lord, forgive us and our brothers who preceded us in faith, and do not place in our hearts any resentment toward those who have believed …'" [Al-Hashr:10]—it is a narration which Allah—Exalted is He—related about those people, and it does not indicate obligation. And likewise, Allah—Exalted is He—relating the seeking forgiveness of Ibrāhīm and Nūḥ (peace be upon them) there is in them nothing that indicates obligation. And likewise, Allah—Exalted is He—relating the seeking forgiveness of the angels for the believers—so all of that does not indicate obligation.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.3