The Targaryens would keep their dragons within the building. Thirty knights could ride abreast into its entrance. No pit dragon ever reached the size of the dragons who were raised before the construction of the building. When living dragons still nested beneath the dome light would shine through the windows at night. 
Prior to the Dragonpit, a great Sept was built on Rhaeny's Hill known as the Sept of Remembrance which used to be the main Sept in King's Landing. During the Faith Militant uprising, Maegor the Cruel mounted on Balerion the Black Dread incinerated the Great Sept with dragonflame and later decreed that a large domed structure would be built on the hill for Targaryens to house its royal dragons. 
The Princess and the Queen
King Aegon II's coronation took place in the Dragonpit.
Later during the Targaryen civil war known as the Dance of the Dragons after King's Landing was captured by Queen Rhaenyra, the dragonpit was destroyed during the Storming of the Dragonpit. When ten's of thousands of crazed and starving smallfolk led by the deranged Shepherd stormed the dragonpit to kill the dragon's within. Five Targaryen dragons (Shrykos, Morghul, Tyraxes, Dreamfyre and Syrax) and thousands of smallfolk were killed.
The dragonpit was reduced to flaming ruins.
The Sworn Sword
During the Great Spring Sickness so many people died so quickly that there was no time to bury the bodies. Instead they were piled up in the Dragonpit and when the corpses were 10 feet deep the Hand of the King, Lord Brynden Rivers, ordered the pyromancers to burn them. The light of the fires shone through the windows and by night citizens could see the dark green glow of wildfire all through King's Landing. 
A Clash of Kings
Some whores use the Dragonpit as a place to entertain their customers and one of them, along with their patron, falls through the floor. There they find a hidden stash of wildfire, placed by Lord Rossart during Robert's Rebellion.
A Dance with Dragons
In Meereen, just before attempting to steal Rhaegal and Viserion, Quentyn Martell recalls readings that suggested that the confines of the Dragonpit had slowed the growth of dragons kept there - none of the dragons bred and raised in the Dragonpit had ever approached the size of Vhagar or Meraxes, much less the Black Dread, King Aegon I Targaryen's monster.