Praying to Allah is the panacea for all hardships
The words of prayer in verse 75: يَقُولُونَ رَبَّنَا أَخْرِجْنَا tell us that one of the reasons why the command to fight came was the prayer made by these weak Muslim men and women. Allah Almighty responded to their prayer and commanded Muslims to wage Jihad against their oppressors and which put an end to their hardships immediately.
The objectives of war
Verse 76 says that الَّذِينَ آمَنُوا يُقَاتِلُونَ فِي سَبِيلِ اللَّـهِ :those who believe fight in the way of Allah and those who disbelieve fight in the way of Taghut.' This clearly shows that the purpose for which a believer strives is to see that the Divine Law becomes operative in this world and that the authority of Allah Almighty reigns supreme, because He is the master of all. He has created the universe in His infinite wisdom, and His Law is based on pure justice, and when the rule of justice is established, there will be peace which sustains. In order that there be peace in the world, it is necessary that it is run under a law which is the Law of the Lord. So, when a true and perfect Muslim fights in a war, this is the purpose before him.
But, in sharp contrast to him, disbelievers seek to spread the message of kufr, give it the widest possible currency, and work to bring about the ascendency of disbelief. They are all too eager to see that satanic powers rule the world so that everything that constitutes kufr and shirk can be enforced in the universal order giving it the sheen and glamour of something seemingly positive. Since kufr and shirk are the ways of the Satan, therefore, the disbelievers help the Satan in doing his job.
The guile of Satan is feeble
The last sentence of verse 76: إِنَّ كَيْدَ الشَّيْطَانِ كَانَ ضَعِيفًا assures that the deceptive plans made by Satan are weak and insubstantial because of which he cannot harm or hurt true Muslims in any way whatsoever. So, Muslims should really not demur when it comes to fighting against the friends of Satan, that is, against the disbelievers. This is because their helper is none other but Allah Himself and, with Allah on their side, the game plan of the Satan is not going to work for them.
And this is what happened at the battle of Badr. There was the Satan by the side of the disbelievers, dishing out his tall claims before them, telling them; لَا غَالِبَ لَكُمُ الْيَوْمَ 'this day, nobody is going to over-power you' - because: إِنِّي جَارٌ لَّكُمْ I am your helper by your side. I shall be there with my armies to support you.) When the actual fighting began, he did advance with his army, but no sooner did he notice that angels have arrived to help Muslims, all plans he had made were frustrated and he took to his heels, saying to his disbelieving accomplices: إِنِّي بَرِيءٌ مِّنكُمْ إِنِّي أَرَىٰ مَا لَا تَرَوْنَ إِنِّي أَخَافُ اللَّـهَ ۚ وَاللَّـهُ شَدِيدُ الْعِقَابِ I bear no responsibility for you. I see what you do not see. I fear Allah for Allah is severe when punishing.) (Mazhari)
That the guile of Satan has been called 'feeble' in this verse (76) is not an isolated statement. There emerge two conditions right from this verse which provide us with an exception. The first one is that the person against whom the Satan is trying his guile must be a Muslim. Then, the second one is that the effort being made by that Muslim must be for the pleasure of Allah alone. In other words, he may not have any selfish motive behind his effort. The first condition emerges from the words: الَّذِينَ آمَنُوا (those who believe) and the second from: فِي سَبِيلِ اللَّـهِ (fight in the way of Allah). If either of the two conditions stop existing, then, it is not necessary that the guile of the Satan remains 'feeble' against him.
Sayyidna Ibn Abbas ؓ has said: When you see Satan, do not think twice. Attack him.' After that, he recited this very verse: إِنَّ كَيْدَ الشَّيْطَانِ كَانَ ضَعِيفًا (No doubt, the guile of Satan is feeble.) (al-Qurtub)