The Red Fort was the main residence of the Mughal Emperors. It was, like Jama Masjid, commissioned by Shah Jahan. Shah Jahan was also the emperor who moved his empire's capital from Agra (where the Taj Mahal is - also commissioned by Shah Jahan!) to Delhi, which is why a lot of these impressive structures are in Delhi today.