And let not their wealth and their children impress you. Allāh only intends to punish them through them in this world and that their souls should depart [at death] while they are disbelievers.
The Prohibition of Prayer for the Funeral of Hypocrites
Allah commands His Messenger to disown the hypocrites, to abstain from praying the funeral prayer when any of them dies, from standing next to his grave to seek Allah's forgiveness for him, or to invoke Allah for his benefit. This is because hypocrites disbelieved in Allah and His Messenger and died as such. This ruling applies to all those who are known to be hypocrites, even though it was revealed about the specific case of `Abdullah bin Ubayy bin Salul, the chief hypocrite. Al-Bukhari recorded that Ibn `Umar said, "When `Abdullah bin Ubayy died, his son, `Abdullah bin `Abdullah, came to the Messenger of Allah ﷺ and asked him to give him his shirt to shroud his father in, and the Messenger did that. He also asked that the Prophet offer his father's funeral prayer, and Allah's Messenger ﷺ stood up to offer the funeral prayer. `Umar took hold of the Prophet's robe and said, `O Allah's Messenger! Are you going to offer his funeral prayer even though your Lord has forbidden you to do so' Allah's Messenger ﷺ said,
Once again, the present verses carry the description of hypocrites who had avoided participating in the battle of Tabuk under one or the other pretext. Among such hypocrites, there were some rich people as well. Their affluent life could have made Muslims ask, ` when these people are so unacceptable with Allah, why did they have to get all those blessings in this world?'
In response, it was said that a little thinking would unfold the reality behind what they possess in the form of wealth and children. These are no mercy and blessing for them. Instead, these are their trial and punishment in this world - not to say much about the additional punishment due in the Hereafter. It is not difficult to understand the reason. They love wealth, guard it and keep worrying as to how they can go on increasing it. They are never at peace. They collect things of comfort around them but genuine peace and comfort never knock at their doors, for they are things of the heart. And since this engrossment in the pursuit of wealth makes them heedless towards the concerns of the Hereafter, they indulge in acts of disobedience to their Creator that in turn becomes the cause of their punishment. So, whether a cause or its effect, it remains a punishment. This is the reason why the Qur'an has used the words: لِيُعَذِّبَهُم بِهَا (to punish them with these) in the sense that Allah Ta` ala wants to punish them by and through these very possessions.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 82–85
The battle of Tabuk occurred in an extremely hot season. From Madinah to the Syrian border three hundred miles had to be travelled. The hypocritical Muslims asked others not to undertake such a long journey in such extremely hot weather. In saying this they forgot that, after hearing the call of God, refusal to set out for fear of some danger amounted to putting oneself in greater danger. It was like running away from the sun and taking refuge in the flames of a fire. Those who are fonder of themselves and their wealth than God are very pleased with themselves if, by their attractive devices, they manage to remain ‘Muslims’ and at the same time there is no danger to their lives and property. They consider themselves wise and treat those people as foolish who struggle so hard for the cause of God that they have no time for themselves. But this is absolute nonsense. They may laugh now, but they will end up crying, because in the life to come after death, their ‘cleverness’ is going to prove to be the worst type of foolishness. At that time they will feel extremely sorry that, though they wanted paradise, they refused to part with the very asset which whould have gained them entry into it.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.