The Quintessons love their courtrooms, and the Hall of Justice, located in Aquatron's capital city of Hydratron, is just one of many kangaroo courts within the Quintesson Inperium, remotely overseen by the Quintesson Judges located on Quintessa. Much like the Supreme Court, it's a vicious circus of a courtroom where defendants face absurdly violent sentences for trumped-up charges. Befitting the watery motif of Aquatron, most of these punishments involve being eaten by sea creatures.
After the Autobots and Decepticons were arrested by Gnaw, they were taken to Hydratron and sent to the Hall of Justice to face trial for Optimus Prime's crime of treason against the Quintessons. In the trial the Quintessons first asserted that they had literally built the first Transformers, and later brainwashed several Autobots into speaking out against their leader. Thanks to Megatron's testimony, the Quintessons decided that the Cybertronians were innocent... and thus started pushing them into a pit infested with Piranacons.
After several Transformers had been eaten alive, the Quintessons decided to leaven their sentence to mere banishment: Optimus and Megatron would fight to the death, and whoever survived would leave unharmed. This was ultimately a ruse, as the arena they fought in was designed to siphon energy from the combatants. When the Quintessons had taken enough Energon, they dumped the two Transformers into the Gamekeeper's cavern to be disposed of.
The surviving Autobots and Decepticons were freed after the Nemesis, under the control, Starscream and Soundwave attacked Hydratron. The ship was shot down and ploughed into the Hall of Justice, destroying it and distracting the Sharkticon guards long enough for the prisoners inside to escape.