As it has been explained before, the Quraysh having lost at the battle of Badr, they yearned for Muslim blood. And hence they mobilized their troops, travelled 100s of miles from their homes to attack Muslims in Madinah. The Prophet (p) having known they would come, he and his Companions got ready to engage the enemy to protect their community.
For detailed historical evidences surrounding this battle, please click on the following article: ‘The Battle Of Uhud – Quraysh Declared War‘. These particular verses (below) were all revealed concerning the battle of Uhud (Tafsir al-Jalalayn,Tanwir al-Miqbâs min Tafsîr Ibn ‘Abbas, Asbab Al-Nuzul by Al-Wahidi and Tafsir Ibn Kathir).
3:165 Why [is it that] when a [single] disaster struck you [on the day of Uhud], although you had struck [the enemy in the battle of Badr] with one twice as great, you said, “From where is this?” Say, “It is from yourselves.” Indeed, Allah is over all things competent.
3:166 And what struck you on the day the two armies met was by permission of Allah that He might make evident the [true] believers.
3:167 And that He might make evident those who are hypocrites. For it was said to them, “Come, fight in the way of Allah or [at least] defend.” They said, “If we had known [there would be] fighting, we would have followed you.” They were nearer to disbelief that day than to faith, saying with their mouths what was not in their hearts. And Allah is most Knowing of what they conceal –
3:168 Those who said about their brothers while sitting [at home], “If they had obeyed us, they would not have been killed.” Say, “Then prevent death from yourselves, if you should be truthful.”
3:169 And never think of those who have been killed in the cause of Allah as dead. Rather, they are alive with their Lord, receiving provision,
In this verse (3:166) God says that when the two sides met at Uhud, the LORD wanted to see who the true believers would be from those who defend the community, and those who sit back.
In 3:167 we see that God tested some of those who were on the Muslim army, on whether they would join in the cause of God, fighting the enemy or sit back and make excuses. God strongly condemns those who act as if they were believers, according to the verse, God says they were nearer to ‘disbelief’ than being a believer.
They used to say stuff but weren’t sincere in the heart i.e., they would say something but their hearts said the opposite. In short they were hypocrites. They weren’t true believers. The verse finishes off with that God knows what they conceal in their hearts.
Quran 3: 168 – Those who sat at home while the Muslims were defending their community, were talking among each other that had those who did go to battle stayed at home, they wouldn’t have been killed. Here, God promises that they will die eventually. Even if death doesn’t come now they will eventually die, whether that be the next day or in 50 years. They will return to their LORD, and be accountable for what they did!
3:169 – Those who sacrificed their lives in order to protect innocents from being persecuted, tortured or even murdered, when they were killed in battle, they aren’t dead but alive.
“126 I.e., at the battle of Badr, in the year 2 H.
127 Many of the followers of the Prophet had been convinced that, whatever the circumstances, God would grant them victory on account of their faith alone. The bitter experience at Uhud came as a shock to them; and so the Qur’an reminds them that this calamity was a consequence of their own doings.
128 Only a fight in self-defence – in the widest meaning of this term – can be considered a “fight in God’s cause” (see 2: 190-194, and the corresponding notes); and, thus, the particle “or” between these two phrases is almost synonymous with the expression “in other words”.
129 This is an allusion to the three hundred men who, on the way from Medina to Mount Uhud, forsook the Prophet on the specious plea that he did not really intend to give battle (see note 90 above). But since they knew in their hearts that it would come to a fight, their defection from God’s cause almost amounted to a denial of Him (kufr, here rendered as “apostasy”).” 
Tafhim al-Qur’an – Sayyid Abul Ala Maududi:
“115 This verse is meant to remove the confusion caused in the minds of the common Muslims by the reverse at Uhd. Though the intimate Companions close to the Holy Prophet were under no delusion that his mere presence among them was a sure guarantee of success, yet the common Muslims were suffering from this misunderstanding.
They thought that the disbelievers could in no way win a victory over them because the Holy Prophet was present among them and the help and succour of Allah was with them.
Therefore, when contrary to their expectations, they met with a reverse at Uhd, they began to ask questions like this: why has this misfortune befallen us, who were fighting for the cause of Allah, and that, too, at the hands of the disbelievers, who had come to destroy Islam?
Above all, they could not understand this because Allah had promised to help and succour them and the Holy Prophet was himself present in the battlefield. They have been told that they themselves were responsible for the disaster.
116 In the battle of Uhd, 70 Muslims were martyred whereas in the battle of Badr, 70 disbelievers were killed and 70 taken as prisoners.
117 That is, “It is the result of your own weakness and wrong acts: you did not show patience; you did things which were against piety; you disobeyed the order of your leader; you became victims of greed and you got engaged in disputes among yourselves: still you ask, “Where has this disaster come from?” defeat.
118 That is, “Allah is able to give victory and is also able to bring about
119This was the pretext with which `Abdullah bin Ubayy returned to Al-Madinah with his 300 men from his way to the battlefield. When the Muslims perceived that he was about to desert the Muslim army, they tried to persuade him to accompany them but he replied, “We are quite certain that there will be no battle today. That is why we are returning home; we would have most surely accompanied you, if we had expected any battle today.” 
Malik Ghulam Farid:
“521. The words refer to the Battle of Badr, when 70 Meccans were killed and 70 taken prisoner. At Uhud, 70 Muslims were killed, none being taken prisoner. Thus the Muslims had already inflicted a double loss on the Meccans.
522. As for the real cause of man’s actions, both the good and evil ones are said to emanate from him.
Because he is their author, but as it is God Who, as the final Judge, brings about the results of those actions, whether good or bad, they can equally be said to proceed from Him (4:79). In this sense, both the good and evil results of man’s actions would be attributed to God.
524. The particle au rendered as ‘and’ literally means ‘or’ and is equivalent to ‘in’ other words, ‘or’ ‘what is the same things as’ etc.
525. The expression, lau na’lamu Qitalan, may mean:
(1) If we knew that there would be fighting i.e., we knew that there would be no fighting and that the Muslims would at once run away before their very powerful enemy without giving fight.
(2) if we knew it to be a fight, i.e., it was no fight in which the Muslims were going to be engaged but rather their certain destruction in view of the appalling difference between the numbers and equipment of the opposing forces.
(3) If we knew how to fight. In this case, the words may be taken to have been spoken ironically, signifying: ‘We are unaware of the art of war: if he had been acquainted with it, we would have fought along with you.’ The allusion in the verse is obviously to the defection at UHUD of a party of 300 hypocrites under their leader Abd Allah b. Ubayy, who deserted the Muslims and went back to Medina.
526. The words ‘saod of their brethren’ may mean ‘said concerning their brethren,’ i.e., Muslims; or ‘talked among themselves about the Muslims.’
527. Amwat is the plural of mayyit which, besides meaning a dead person, signifies, (1) one whose blood has not been avenged; (2) one who leaves behind no successors: (3) one stricken with sorrow and grief.” 
Maulana Muhammad Ali:
“165a. The disbelievers had already suffered twice at the hands of the Muslims, once in the field of Badr and again in the early stages of the battle of Uhud. In Badr alone they had inflicted on the disbelievers double the loss which they suffered in Uhud. At the latter place they lost only seventy killed, while at Badr the disbelievers lost 140, seventy killed and seventy prisoners.
167a. The words show clearly that in the language of the Qur’an, fighting in Allah’s way carries the significance of fighting in self-defence.
167b. They feigned they did not know how to fight. Or the meaning may be, if we knew that it was a fight, the implication being that the Muslims were going, not to fight but to sure destruction with such a disparity of numbers.” 
 The Message of The Quran translated and explained by Muhammad Asad, page 147 http://www.usc.edu/schools/college/crcc/private/cmje/religious_text/The_Message_of_The_Quran__by_Muhammad_Asad.pdf
 Sayyid Abul Ala Maududi – Tafhim al-Qur’an – The Meaning of the Qur’an
 The Holy Qur’an – Arabic Text With English Translation & Short Commentary By Malik Ghulam Farid, page 169 – 170
 The Holy Quran Arabic Text with English Translation, Commentary and comprehensive Introduction [Year 2002 Edition] by Maulana Muhammad Ali, page 181 – 182