As regards the question why was Madinah chosen for Hijrah, we would like to cite for you the following words of Sayed Abul A`la Al-Maududi, who explains some reasons for which Madinah was chosen to be the centre of Da`wah at its very early days:
Makkan elders devised a plot to assassinate the Prophet (peace and blessings be upon him) in order to nip the Islamic movement in the bud. When affairs reached that pitiful state, Almighty Allah ordered His Messenger to leave Makkah and migrate to Madinah.
Madinah, a city some 450 kilometers from Makkah, was growing as a centre for Islam. A number of people had already been converted to the new faith. Islamic teachings were winning new supporters every day. Leaders of the two major tribes of Madinah had accepted Islam and were ready to sacrifice their lives and property for the cause of Islam. At this point, the Prophet started planning to move to Madinah.
Excerpted, with slight modifications, from islam101
In order to have a clear view of other reasons for choosing Madinah to be the centre of the nascent Muslim state, we would like to cite the following for you:
Yathrib had been chosen by Allah to shelter the Prophet (peace and blessings be upon him) after his migration and to bring forth not only the first Islamic Society but also to serve as a focal point for the universal call of Islam. The great honor accorded to the city makes it necessary to know its distinctive features. Such as its physical, social and cultural conditions, the Arab tribes living there and their mutual relations, the economic and political manipulations of the Jews and their fighting spirit as well as the way of life sustained by its fertile land. Various religions, cultures and communities flourished in the city tremendously, contrary to Makkah, which was dominated by one faith and one cultural pattern. The following details given here depict the state of affairs in Madinah when the Prophet (peace and blessings be upon him) made his debut in that city.
Three Jewish tribes, Banu Qaynuqa`, Banu an-Nadir and Banu Quraydha, were settled in Madinah. The number of adults belonging to these tribes was over two thousands; Banu Qaynuqa` was estimated to have seven hundred combatants, with Banu an-Nadir having almost the same number too, while the grown-ups of Banu Quraydha were reported to be between seven and nine hundred.
These tribes were not in good terms and very often they are caught in confrontations with one another. The Qur’an makes a reference to the mutual discord between the Jews: (And when We made with you a covenant (saying): Shed not the blood of your people nor turn (party of) your people out of your dwellings. Then ye ratified (Our covenant) and ye were witnesses (thereto). Yet it is you who slay each other and drive out party of your people from their homes, supporting one another against them by sin and transgression – and if they come to you as captives ye would ransom them, whereas their expulsion was itself unlawful for you.) (Al-Baqarah 2: 84-85)
The financial relationship of the Madinan Jews with the other tribes was mainly limited to lending money on interest or on security or sequestration of personal property upon payment failure. In an agricultural region like Madinah, there was ample scope for money-lending business since the farmers very often needed capital for purposes of cultivation. (Dr. Muhammad Sayyid Tantawi, Banu Israel Fil-Qur’an was-Sunnah, pp. 80-81)
The system of lending money was not limited merely to pledging personal property as security for repayment of the loan, for the lenders very often forced the borrowers to pledge even their women and children.
Concentration of capital in the hands of the Jews had given them power to exercise economic pressure on the social economy of the city. The stock markets were at their mercy. They rigged the market through hoarding, thereby creating artificial shortages and causing rise and fall in prices. Most of the people in Madinah detested the Jews owing to such malpractices of usury and profiteering, which were against the substance of the common Arabs. (Banu Israel Fil-Qur’an was-Sunnah, p. 79)
The Jews being driven by nothing but their haughty cupidity and selfishness in their social transactions with the Arab tribes, Aus and Khazraj, spent lavishly, though judiciously, in creating a rift between the two tribes. On a number of occasions in the past, they had successfully pitted one tribe against the other, leaving both tribes worn out and economically ruined in the end. The only objective Jews had set before themselves was how to maintain their economic dominion over Madinah.
For many centuries, the Jews had been waiting for a redeemer. This belief of the Jews in the coming prophet, about which they used to talk with the Arabs, had prepared the Aus and the Khazraj to give their faith readily to the Prophet. (Banu Israel Fil-Qur’an was-Sunnah, pp. 73-101) Source: http://www.prophetmuhammed.org/docs/biograf_d39.html
Within all these communal differences, it was necessary to place this growing Muslim community so as to give Muslims a good chance for better interaction and sufficient training that will help them in their coming days. Madinah had many unique features that made her the due recipient of that honor. It was very important for Muslims to receive training and establish their state amongst all these communities and different levels of thinking.
Dealing with Jews taught Muslims how to argue with the People of the Book in good words and how to know the wicked and cunning conspiracies being made for them behind their backs. It was very important for the growing Muslim communities to be trained on the way of fighting those enemies who take refuge in their fortifications, a thing, which was practiced by Jews.
It was also necessary for the Islamic Da`wah, at this very early age, to face hypocrites who apparently declare that they believe in Islam but, in the meantime, help its enemies. All these are no more than some aspects of the Divine wisdom behind choosing Madinah to be the place where the first Muslim state is established.
And Allah knows best.