First and foremost, King Solomon built the first Holy Temple in Jerusalem between the years 965 and 928 BCE.
The Holy Temple was reserved for the priests (cohanim) who were descendants of Aaron. But in the year 586 the Babylonian monarch Nebuchadnezzer invaded Jerusalem, destroyed the Holy Temple carried off its implements made of precious metals.
When Nehemiah returned from Babylon around 536 with the first group of exiles the city was rebuilt, and the Holy Temple and Jerusalem were again the principle focus of national religious life until the destruction of the Second Temple by the Romans in the year 70 CE. Following the suppression of Bar Kochva's revolt, the Roman Legions burned all of Jerusalem to ashes and in its place built a pagan city they called Aelia Capitolina.
It is a tradition with all that the place in which David and Solomon built the sacrificial altar and which held the Holy Ark on its floor is the place in which Abraham built an altar and bound Isaac on it, and it is the place on which Noah built when he came out of the ark, and it is the altar on which Cain and Abel sacrificed, and on which Adam sacrificed when he was created and on which he was created. As the sages say: "He was created from his place of atonement." In other words, as the passage from the Rambam illustrates, the reason Jerusalem is the holiest city in Judaism is that in the 5000 year span of Jewish religious life the nation's devotion to God has intersected more with this city and more intensely than with any other.
Various factors make Jerusalem holy to Muslims At first glance, the holiness of Jerusalem in the Muslim tradition is also religious at heart, and stems from the belief that Muhammad the prophet founder of Islam rose to heaven from the site of the Holy Temple in Jerusalem. But it seems other factors beside religion played a role too.
After the prophet died in June 632 a series of successors, or caliphs, assumed authority as Islam's leaders. Between 661 and 750 the Umayyad Dynasty held the Caliphate and ruled from Damascus. During the time they ruled, on account of various internal and external pressures the Umayyads exerted enormous effort to elevate Jerusalem's status, perhaps even to the level of Mecca.
Daniel Pipes wrote in the Middle East Quarterly: "The first Umayyad ruler, Mu'awiya, chose Jerusalem as the place where he ascended to the caliphate; he and his successors engaged in a construction program - religious edifices, a palace, and roads - in the city. The Umayyads possibly had plans to make Jerusalem their political and administrative capital...But Jerusalem is primarily a city of faith, and, as the Israeli scholar Izhak Hasson explains, the "Umayyad regime was interested in ascribing an Islamic aura to its stronghold and center."
Toward this end (as well as to assert Islam's presence in its competition with Christianity), the Umayyad caliph built Islam's first grand structure, the Dome of the Rock, right on the spot of the Jewish Temple, in 688-91. This remarkable building is not just the first monumental sacred building of Islam but also the only one that still stands today in roughly its original form."
The next step the Umayyads took to make Jerusalem holy to Islam relates to a passage in the Quran (17:1) that describes Muhammad's Night Journey to heaven: "Glory to He who took His servant by night from the Sacred Mosque to the furthest mosque (al masjidi al aqsa)."
Pipes explains that when this Quranic passage was first revealed, in about 621, a place called the "Sacred Mosque" already existed in Mecca. "In contrast," he goes on, "the 'furthest mosque' was a turn of phrase, not a place. Some early Muslims understood it as metaphorical or as a place in heaven."
In other words, the line about the furthest mosque in the Quran is just a figure of speech. Which means there is no basis for associating the furthest mosque - the Quranic location of the start of Muhammad's Night Journey - with the city of Jerusalem.
In 715, Pipes writes, the Umayyads did something very clever. To build up the prestige of their domain, they built a second mosque in Jerusalem, again on the Temple Mount, and named this one the "Furthest Mosque" (i.e. al-masjidi al-aqsa) the exact same name written in the holy Quran. And in so doing, the Umayyads forced the city of Jerusalem to assume a role in the life of the prophet Muhammad. A role which it never had. This is how the Muslim belief in the holiness of Jerusalem, which persists to this day, originated.
It's impossible to escape the conclusion, as the Palestinian historian A.L. Tibawi writes, that building an actual Al Aqsa Mosque "gave reality to the figurative name used in the Quran..." As Pipes points out, moreover, "it had the hugely important effect of giving Jerusalem a place in the Quran post hoc which naturally imbued the city with a higher status in Islam". Which is another way of saying, before the Umayyads built Dome of the Rock and Al Aksa, Jerusalem had no status at all in Islam.
Israeli scholar Izhak Hasson says: "construction of the Dome of the Rock and al-Aqsa mosque, the rituals instituted by the Umayyads on the Temple Mount and the dissemination of Islamic-oriented Traditions regarding sanctity of the site, all point to the political motives which underlay the glorification of Jerusalem among the Muslims." In other words the sanctification of Jerusalem in Islam is based on the Umayyad building program. And their cleverness in bringing about a (baseless) association between the al-masjid al-aqsa mentioned in the holy Quran and the mosque they built on the Temple Mount and purposely named Al Aqsa, precisely so that it would assume a measure of Quranic holiness it did not have.
Perhaps the most convincing evidence of Islam's very loose and insignificant bond with Jerusalem is how the Muslims related to the city after the Caliphate passed from the Umayyads to the Abbisid's in 750. Daniel Pipes writes: "Jerusalem fell into near-obscurity. For the next three and a half centuries, books praising this city lost favor and the construction of glorious buildings not only came to an end but existing ones fell apart (the dome over the rock collapsed in 1016.)
These days, the never-ending cry for a Palestinian state with Jerusalem as its capital surely contains a trace of the claim that the city is holy in Islam. But essentially the historic record shows that the actions and circumstances on which the claim is based aren't very holy at all. In fact, by any standard of religious values in any society in the world, artificially imbuing a place with holiness, through wordplay and administrative sleight of hand, constitute the very opposite of holiness.