The Adventure of Link
Link must place each of the six Crystals given to him by Impa in a statue at the end of each of the Palaces. Once all six Crystals have been returned, Link is able to break the Binding Force erected by the King of Hyrule, enter the Great Palace, and retrieve the Triforce of Courage.
A Link to the Past
The Crystals are diamond-shaped prisons where the Seven Maidens, including Princess Zelda herself, are kept. Each Crystal is kept in one of the seven Dark World dungeons and is acquired by defeating the boss in the respective dungeon.
The seven Crystals with the power of the Maidens are required to break the seal on Ganon's Tower and enter it.
Official Artwork for A Link to the Past