The background for these verses (below) is related to the expedition of Tabuk (Tafsir Ibn Kathir, Tafsir al-Jalalayn, Tanwr al-Miqbas min Tafsir Ibn Abbas, and Ibn Juzayy), which we have written about in detail here: ‘Answering Jihad: “Fight Against Those Who Do Not Believe’ – Quran 9:29“. This expedition took place as a result of the aggression and impending army of Byzantine (Roman) Empire who were at the borders of Syria ready to attack the Muslim community. The Prophet (p), upon receiving news of them, he got his people ready to engage the enemy.
9:38 O you who have believed, what is [the matter] with you that, when you are told to go forth in the cause of Allah, you adhere heavily to the earth? Are you satisfied with the life of this world rather than the Hereafter? But what is the enjoyment of worldly life compared to the Hereafter except a [very] little.
9:39 If you do not go forth, He will punish you with a painful punishment and will replace you with another people, and you will not harm Him at all. And Allah is over all things competent.
9:40 If you do not aid the Prophet – Allah has already aided him when those who disbelieved had driven him out [of Makkah] as one of two, when they were in the cave and he said to his companion, “Do not grieve; indeed Allah is with us.” And Allah sent down his tranquillity upon him and supported him with angels you did not see and made the word of those who disbelieved the lowest, while the word of Allah – that is the highest. And Allah is Exalted in Might and Wise.
9:41 Go forth, whether light or heavy, and strive with your wealth and your lives in the cause of Allah. That is better for you, if you only knew.
9:44 Those who believe in Allah and the Last Day would not ask permission of you to be excused from striving with their wealth and their lives. And Allah is Knowing of those who fear Him.
9:52 Say, “Do you await for us except one of the two best things while we await for you that Allah will afflict you with punishment from Himself or at our hands? So wait; indeed we, along with you, are waiting.”
9:38 – The verse is directed to some of the Companions of Prophet Muhammed (p), why they are not going on the expedition of Tabuk (Tanwir al-Miqbas min Tafsir Ibn ‘Abbas) to defend the community and innocent lives?
9:39 – Those Companions who have no health problems and are capable of going on the expedition of Tabuk, here God warns them that if they don’t go out to defend the community they will be punished in the hereafter for neglecting their duty.
9:40 – If those companions don’t aid the Prophet (p) on the expedition to Tabuk, God Almighty has already helped him. Just as HE did when the Quraysh exiled the Prophet out of Makkah, and had to hide in a cave, where God protected the Prophet (p) and those with him from being harmed by the Quraysh (Tafsir al-Jalalayn and Tanwir al-Miqbas min Tafsir Ibn ‘Abbas).
9:41 – The Muslims who for were equipping themselves for Tabuk, are told to prepare themselves light armed and heavy armed. And to strive with whatever wealth they have in the cause of defence (Tanwir al-Miqbas min Tafsir Ibn ‘Abbas).
9:44 – God says in the verse, that those Muslims who believe in HIM and the day of reckoning would not ask permission not go on the expedition to Tabuk, given that they have no health problems.
9:52 – This is the answer to those hypocrites who, as usual, were not taking any part in the conflict between the Muslims and the Byzantine Empire (expedition of Tabuk). This verse is a continuation from 9:44 to 9:51, where it speaks of the hypocrites who used to make trouble for the Muslims, at any chance given.
They were on both sides of the camp. If the Muslims lost against an enemy, they would cheer the other side of the camp that they were on their side all along and if the Muslims had won, they would say that they were with them along. Double-faced group of people. The punishment mentioned speaks of the hereafter. The hypocrites were never harmed in this world, unless they actively fought against the Muslims then.
Furthermore, the persons mentioned here could most probably refer to those hypocrites who wanted, with the help of |Abu Amir, to assassinate Prophet Muhammed (p) (Read more on this incident here: ‘The Demolition Of Masjid Al-Dirar‘).
Dr. Muhammad Asad:
“55 I.e., “just as all of them are, as it were, united against you in their rejection of the truth, be united against them in your readiness for self-sacrifice”. As regards the circumstances in which the Muslims are authorized to make war against unbelievers, see the earlier parts of this surah, and especially verses 12-13, as well as 2:190-194, where the general principles relating to war are laid down. …
59 I.e., “you are sluggish in your response, clinging to the life of this world”. This verse – as well as most of this surah from here onward – alludes to the campaign of Tabuk, in the year 9 H. The immediate reason for this expedition was the information which the Prophet received to the effect that the Byzantines, made apprehensive by the rapid growth
of Islam in Arabia and incited by the Prophet’s enemy Abu ‘Amir (see note 142 on verse 107 of this surah), were assembling large forces on the confines of the Peninsula with a view to marching against Medina and overthrowing the Muslims.
To guard against such an assault, the Prophet assembled the strongest force the Muslims were capable of, and set out in the month of Rajab, 9 H., towards the frontier.
On reaching Tabuk, about half-way between Medina and Damascus, the Prophet ascertained that the Byzantines were either not yet ready to invade Arabia or had entirely given up the idea for the time being; and so – in accordance with the Islamic principle that war may be waged only in self-defence – he returned with his followers to Medina without engaging in hostilities.
At the time of the preparation for this expedition, the hypocrites and a minority among the believers displayed an extreme reluctance (referred to in this and the following verses) to embark on a war with Byzantium: and it is this minority that the above verse reproaches for “clinging heavily to the earth” (Manor X, 493). 60 Lit., “him”, i.e., Muhammad.
61 Lit., “the second of two”: an allusion to the Prophet’s flight, in the company of Abu Bakr, from Mecca to Medina in the year 622 of the Christian era. The expression “the second of two” does not imply any order of precedence but is synonymous with “one of two”: cf. the Prophet’s saying to Abu Bakr, on that very occasion, “What [could], in thy opinion, [happen] to two [men] who have God as the third with them?”
(Bukhari, in the chapter Fada’il Ashab an-Nabi)
62 When the Prophet and Abu Bakr left on their hijrah to Medina, they first hid for three nights in a cave on Mount Thawr, in the vicinity of Mecca, where they were almost discovered and apprehended by the pagan Quraysh who were pursuing them (Bukhari, loc. cit.). 63 Cf. verse 26 above.
64 Lit., “is the highest”. The expression rendered by me as “cause”, which occurs twice in this sentence, reads, literally, “word” (kalimah).
65 Lit., “lightly or heavily”. The rendering adopted by me corresponds to the interpretation given to this expression by most of the classical commentators (e.g., Zamakhshari and Razi).
66 A reference to the unwillingness of some of the Muslims to follow the Prophet’s call and to set out on the expedition to the frontier (see last paragraph of note 59 above). A strenuous march of about fourteen days was needed to reach Tabuk, the goal of this expedition; and the uncertainty of its outcome, as well as the hardships involved, gave rise to all manner of spurious excuses on the part of the half-hearted believers and hypocrites.
As the next verse shows, the Prophet accepted these excuses in many cases, and allowed the men concerned to remain at Medina.
73 I.e., in the course of the expedition to Tabuk, during which most of this surah was revealed.
One should, however, bear in mind that these verses have not merely a historical connotation but, rather, aim at depicting hypocrisy as such.
74 I.e., either victory or martyrdom in God’s cause. The verb tarabbasa has usually the connotation of waiting with expectancy, and is, therefore, most suitably rendered as “he hopefully waited”.
75 Sc., in the life to come.” 
Malik Ghulam Farid:
“1184. The reference is to the expedition to Tabuk, a town situated about halfway between Medina and Damascus. News was brought to the Holy Prophet that the Greeks of the Eastern Roman Empire, popularly known as the Romans, has amassed on the Syrian frontier.
At the head of an army about 30.000 strong the Holy Prophet left Madinah in the 9th year of the Hijrah. On account of great hardships the Muslim army had to suffer in the long and difficult journey, it came to be known as Jaish al-Usrah, i.e., the distressed army.” 
Maulana Muhammad Ali:
“… 38a. The reference here is to the expedition of Tabuk, which was undertaken in the middle of the ninth year of the Hijrah owing to the threatening attitude of the Roman Emperor. There were many hindrances to the raising of an army sufficient to meet the strong forces of the Roman Empire.
The chief of these, as enumerated by Rz, are:
(1) a great drought;
(2) the length of the journey to the confines of Syria;
(3) the ripening of the fruits, which were now ready to be gathered;
(4) the intensity of the heat; and (5) the organization and power of the Roman army. In spite of all these difficulties 30,000 men gathered round the Prophet’s banner.
40a. This refers to the Prophet’s flight from Makkah, when he was forced to hide himself in a cave called Thaur, about three miles from Makkah, with only one companion, Abu Bakr.
The believers are told that Allah saved the Prophet from the hands of his enemies when he had but one companion amidst a whole nation of enemies, and that Allah would help him now. Abu Bakr’s devotion to the Holy Prophet was so great that the latter chose him to be his “sole companion”, the second of the two, in that most critical hour of his life.
The following account from Muir will explain the reference: “He himself went straightway to the house of Abu Bakr, and after a short consultation ventured the plan for immediate flight. Abu Bakr shed tears of joy; the hour of emigration had at last arrived, and he was to be the companion of the Prophet’s journey …
They crept in the shade of the evening through a back window, and escaped unobserved from the southern suburb. Pursuing their way south, and clambering in the dark up the bare and rugged ascent, they reached at last the lofty peak of Mount Thaur, distant about an hour and a half from the city, and took refuge in a cavern near its summit …
The sole companion, or in Arabic phraseology the second of the two, became one of Abu Bakr’s most honoured titles … Muhammad and his companion felt it no doubt to be a time of jeopardy. Glancing upwards at a crevice through which the morning light began to break, Abu Bakr whispered: ‘What if one were to look through the chink and see us underneath his very feet!’ ‘Think not thus, Abu Bakr!’ said the Prophet, ‘We are two, but God is in the midst a third.’ ”
41a. That is, whether it is easy or difficult for you to proceed or whether you are sufficiently armed or not.
42a. Tabuk was midway between Madinah and Damascus. The Arabs were accustomed to fighting near home; hence, the distance was one of the chief considerations which held back those who were insincere.
52a. The two most excellent things are, the laying down of life in the cause of Truth, or being sharer in the ultimate triumph of Truth. The Muslims never thought that they could be defeated. They would either die defending the cause of Truth or live and conquer. The only punishment that the hypocrites received from the hands of the Muslims was that they were named and asked to leave the mosque (IJ).
Otherwise their liberty was not interfered with. There is mention of one of them living in Madinah to the time of ‘Uthman, the third Caliph, in full enjoyment of his rights as a citizen; the only distinctive treatment mentioned of him is that the poor-rate was not accepted from him by the Holy Prophet, or by his three immediate successors. See also the next verse.” 
 The Message of The Quran translated and explained by Muhammad Asad, page 383 – 388
 The Holy Qur’an – Arabic Text With English Translation & Short Commentary By Malik Ghulam Farid, Page 386
 The Holy Quran, Arabic Text with English Translation, Commentary and comprehensive Introduction [Year 2002 Edition] by Maulana Muhammad Ali, page 407 – 411