There are two kinds of atheist and polytheist:
1. Obstinate: disbelievers impugning the TRUTH and showing hostility in spite of being convinced in their hearts:
فَلَمَّا جاءَتْهُمْ آياتُنا مُبْصِرَةً قالُوا هذا سِحْرٌ مُبينٌ
But when Our signs came to them, as eye-openers, they said," This is plain magic."(27:13)
وَ جَحَدُوا بِها وَ اسْتَيْقَنَتْها أَنْفُسُهُمْ ظُلْماً وَ عُلُوًّا فَانْظُرْ كَيْفَ كانَ عاقِبَةُ الْمُفْسِدينَ
They impugned them though they were convinced in their hearts wrongfully and defiantly. So observe how was the fate of the agents of
and the reason for such presumptuous hostility has been mentioned in other verses:
ثُمَّ كانَ عاقِبَةَ الَّذينَ أَساؤُا السُّواى أَنْ كَذَّبُوا بِآياتِ اللَّهِ وَ كانُوا بِها يَسْتَهْزِؤُنَ
Then the fate of those who committed misdeeds was that they denied the signs of Allah and they used to deride them.(30:10)
2. Non-obstinate (Mustada'f): disbelievers for whom the TRUE call of Islam has not been set forth due to certain reasons. However they are willingly prepared in their hearts to accept the TRUTH if it is rightly set out for them.
Any Kind of Dua (prayer) for the first group would be meaningless, even if it were a prayer for guiding them and helping them to get back to the straight path because they are fully aware of the truthfulness of Islam, they have learned all ins and outs of the TRUTH yet they keep stubbornly refusing to accept it:
ما كانَ لِلنَّبِيِّ وَ الَّذينَ آمَنُوا أَنْ يَسْتَغْفِرُوا لِلْمُشْرِكينَ وَ لَوْ كانُوا أُولي قُرْبى مِنْ بَعْدِ ما تَبَيَّنَ
لَهُمْ أَنَّهُمْ أَصْحابُ الْجَحيمِ
The Prophet and the faithful may not plead for the forgiveness of the polytheists, even if they should be [their] relatives, after it
has become clear to them that they will be the inmates of
The last part of the verse which is written in italics demonstrate that those of whom the Prophet and the faithful were forbidden to plead for forgiveness, fall into the first category.
وَ ما كانَ اسْتِغْفارُ إِبْراهيمَ لِأَبيهِ إِلاَّ عَنْ مَوْعِدَةٍ وَعَدَها إِيَّاهُ فَلَمَّا تَبَيَّنَ لَهُ أَنَّهُ عَدُوٌّ لِلَّهِ
تَبَرَّأَ مِنْهُ إِنَّ إِبْراهيمَ لَأَوَّاهٌ حَليمٌ
Abraham's pleading forgiveness for his father was only to fulfill a promise he had made him. So when it became manifest to him that he
was an enemy of God, he repudiated him. Indeed Abraham was most
plaintive and forbearing.(9:114)
Not only aren't we allowed to plead forgiveness for the enemies of God, we should also repudiate them as Prophet Abraham repudiated his father when it became clear to him that he was an enemy of God.
However the second group (Mustada'fin) are not the enemy of God as explained before. So there is nothing wrong with pleading for their guidance. Nevertheless pleading for forgiveness of them is also meaningless owing to the fact that Since they've done their best in the search of TRUTH and failed to find it, they'll not be subjected to any kind of punishment in the here after.