The Battle of Uhud took place in the year 625 AD (3 Hijri), as a consequence of the Quraysh who had declared war against the Muslims. The enemy had lost at the Battle of Badr, and hence they were thirsty to go battle against the Muslims again, wanting revenge for the loss at Badr.
The decade long persecution Muslims suffered in the hands of Quraysh was not enough for them. They continued with plots every-time they got an opportunity, all because the Muslims had abandoned their pagannistic faith and embraced the religion of Islam.
The Battle of Uhud was the consequence of the Battle of Badr where the enemy lost. They yearned for revenge and under the command of Abu Sufyan they prepared for war against Muslims.
The Battle was a war of self-defence on the side of the Muslims. This was their only choice to survive, that they had to fight the enemy if they were to see another day alive.
Kitab al-tabaqat al-kabir – Ibn Sa’d:
“GHAZWAH OF THE APOSTLE OF ALLAH AGAINST UHUD
Then (occurred) the ghazwah of the Apostle of Allah, against Uhud on Saturday 7 Shawwal after the commencement of the thirty second month from his Hijrah. They (narrators) said: When those polytheists, who were present at Badr, returned to Makkah, they found the caravan, with which Abu Sufyan had come, staying at Dar al-Nadwah. The chiefs of the Quraysh went to Abu Sufyan and said:
We will be pleased if you equip an army with the profit of this caravan, to (encounter) Muhammad. Abu Sufyan said: I am the first person to respond to this and Banu Abd Manaf are with me. Then they sold (the merchandise) and got gold in return. There were (with them) one thousand camels and fifty thousand dinars.
He returned the capital to the men of the caravan and retained the profits. In trade they had earned a profit of a dinar for a dinar (i.e. 100%). …” 
“THE EXPEDITION TO UHUD
In this year also there took place the expedition of the Messenger of God to Uhud. This is said to have been on Saturday, 7 Shawwal, in Year Three of the Hijrah (March 23, 625).
Abu Ja’far (al-Tabari) says: What provoked the expedition to Uhud by the polytheists of Quraysh against the Messenger of God was the battle of Badr and the killing of those nobles and chiefs of Quraysh who were kill there.” 
“THE BATTLE OF UHUD
Ever since their defeat at Badr, the Quraish could not find any peace of mind and the subsequent events only helped to intensify their enmity. Thus by the time a year had elapsed the Quraish had completed their preparations, their allies had gathered around them, and everyone who had a grudge against Islam and the Muslims had joined them.
The revengeful army of more than three thousand then set out to Madinah. Its leader, Abu Sufyan, saw fit to bring their women with them so that they might urge the men to fight valiantly to protect their honour.
The old enmity and the suppressed anger kindled the hatred in their hearts and reflected the bitterness of the fight that was about to ensure. In the early days of Shawwal in the third year, the marching army reached Madinah, camped near the mountain of Uhud, and let their horses loose to graze in its fields which extended all around.
The Muslims gathered around the Prophet, thinking about their affair. Should they go out into the open to fight the enemy, or allow them to reach the streets of Madinah and fight them there while the women fought from the rooftops? The Prophet was inclined to the latter opinion, and in this he was supported by men known for their far-sightedness. Abdullah Ibn Ubayy himself favoured this opinion. However, the men who had not witnessed Badr were to go out.” 
Hajjah Amina Adil:
“THE BATTLE OF UHUD
The Quraysh could not forget the heavy losses they had suffered in the Battle of Badr, and their reliance on their powers was shaken. They had lost seventy people in one encounter, and most of them had been the foremost and eminent men of Quraysh. In short, all of Mecca was in mourning. Abu Sufyan stood up and yelled at people, saying,
‘When will Badr be avenged?’ Ikrimah, the son of Abu Jahl, said,
‘What has happened to us? At one time the murder of a single person would spark of lengthy bloodletting in revenge. The losers would kill in revenge attacks for as long as it took for them to be victorious. Now Muhammad’s troop has condemnded us to disgrace. We have lost so many of our noblest sons, yet we make no move to avenge them.
‘Surely, this can only mean that we are totally destroyed. Why does no one avenge the death of my father? We have made great profits from the caravan trade, but nobody can deny the superiority of the Muslims in strength of mind; this we must try to destroy by our means.
For instance, we should compose poetry of propaganda to incite all the tribes of Arabia with their songs and dirges to join their forces to ours.
It won’t do to waste any time, for those followers of Muhammad grow stronger with every passing day. Also, we should give all the women in Mecca who have lost their husbands, brothers or sons the task of encouraging the fighters.’
Thus in Mecca, people spoke as if the city were remain their for ever. Abu Sufyan donated fifty thousand pieces of gold in order to encourage the fighting men.
Allah Almighty instantly informed His beloved Prophet of this development in the revelation of this verse:
‘The unbelievers expend their wealth to bar from God’s way; and still they will expend it, till it is an anguish for them, then be overtbrown….
As for the women, they mingled among the men, saying, ‘We swear that we want to drink the blood of the murderers of our sons, husbands and brothers.’ At the head of them all was Hind, the wife of Abu Sufyan, the mother of Mu’awiya, the grandmother of Yazid; Umm Hakim, the daughter-in-law of Abu Jahl; Rayta, the wife of Amr al-As;
Balza, the wife of Safwan Ibn Umayyah; and Hamnah, the wife of Mus’ad Ibn Umayr. Hind promised the slave Subayr – who was called Wahshi – his freedom and a handsome reward besides, if he succeeded in killing Hamza, the uncle of Muhammad.
The Quraysh were thirsting for blood and prepared their move. There were fifteen women who accompanied the army, playing on their drums and singing lewd songs:
‘We don’t want men in our beds who lie asleep all day in their houses, we want men who exact revenge for Badr.’
They went to Abbas, the Prophet’s uncle and asked him,
‘What shall we do?’ Though Abbas had already embraced Islam in his heart, he did not yet show it openly. He objected that he had been very much worn out in the Battle of Badr, and defeated on all accounts and could therefore not come along this time. He then sought to inform the Holy Prophet immediately, so he wrote a letter and hired a man to deliver it to the Holy Prophet as quickly as possible.
The messenger found the Holy Prophet at Kuba and gave him the letter. The Holy Prophet gave Umayya the letter to read, but ordered him to keep the matter to himself. He then went to the house of one of the notables of Kuba, Sa’d Ibn Rabi, and there explained to him in a confidential manner the contents of the letter he had received concerning the war preparations of the Quraysh.
After lengthy deliberations he ordered the return to Madinah. This occurred in the third year of the Hijra in the month of Shawwal. The Holy Prophet sent out two reliable men as scouts who brought him news of the approaching army of Quraysh, and that their riders had passed the fields of Madinah.
The Holy Prophet sent out Hubab Ibn al-Mundhir who had been the commanding officer at the Battle of Badr to learn about the strength of the enemy forces. In this way they took all necessary precautions to forestall a sudden, unexpected attack, setting up watches at all the important points.
Sa’d Ibn Mu’adh and Sa’d Ibn Ubayda held the night watch before the Prophet’s Mosque. The women and children of the town, and the old and feeble were ordered to withdraw to safe quarters.
One morning the Holy Prophet called together the leaders of the Sahaba and Ansar and convened a war council. He said to them,
‘If it is reasonable, we should close the gates of the city and defend our area from inside, without leaving the city. Only in case the enemy enters the city, we would engage in battle with them.’
The Holy Prophet had sent out Hubab Ibn al-Mundhir to scout out the positions of the Quraysh. He now returned and reported that they were encamped at a place called Uray, one day’s journey from Madinah. The army of Quraysh had arrived at the foot of the mountain of Uhud on a Wednesday and remained there till Friday. This was also confirmed in the letter by Abbas, the Prophet’s uncle.
The Holy Prophet is reported to have seen this dream on Thursday night: ‘I saw in my dream a herd of cattle being slaughtered and I saw a gash open upon the blade of my sword; upon my back I wore a suit of mail, and my hand I stuck into the collar of a suit of mail.’
And this is the interpretation he gave to it:
‘The slaughtered cattle are those companions who will be martyred; the blade of my sword being broken means that one of my family will be killed; and that firm coat of armor signifies Madinah.’
We have already mentioned that it was the Holy Prophet’s wish only to engage in battle with defensive intent, and to leave the city of Madinah only in case of enemy attack. Moreover, the enemy was in a consolidated position, and he thought that the Bedioun tribesmen gathered in the environs of the city of Madinah could not stay there for long. On the other hand there were some enthusiastic young men who had not participated in the Battle of Badr who said to the Prophet,
‘Oh Prophet of Allah! You would be depriving us! Already we were not able to go to Badr, and our hearts swelled with faith and wish to fight for it!’
The Much beloved uncle of the Holy Prophet Hamza said, ‘Oh Prophet of Allah! I find it very difficult to stay locked up within the city.’
Thereupon the Holy Prophet said,
‘Very well, so make ready for battle!’ Peparations then were made. At that time he spoke these words of profound meaning: ‘If you are patient, you will again encounter help from Allah.’ That same day in the Khutba of the Jum’a prayer the Holy Prophet spoke of the virtue and merit of a battle waged for the sake of Allah and for the defense of one’s homeland, which is the mantle of religion.
After the prayer of Asr he took Abu Bakr and Umar with him into his own blessed apartment and they donned their battle dress. They wound the turbands that they wore on such campaigns, put on their coats of mail and girded their swords. …” 
 Kitab al-tabaqat al-kabir, Ibn Sa’d, volume 2, page 42
 The History of al-Tabari: The Foundation of the Community: Muhammad volume 7, page 105
 Fiqh-us-seerah, By Muhammad Al-Ghazali, page 279
 Muhammad, the Messenger of Islam: His Life & Prophecy By Hajjah Amina Adil, page 320-323