The Pandorica was mentioned by Prisoner Zero to the Doctor and told him that it would open and that silence would fall. (DW: The Eleventh Hour). River Song also mentioned the Pandorica to the Doctor, telling him she would next see him there and that she remembered it well. The Doctor believed the Pandorica to be a fairytale. (DW: Flesh and Stone) The Pandorica turned out to be a prison, built possibly by The Alliance for the Doctor to stop him from destroying all Universes. (DW : The Pandorica Opens )
Its later revealed that the Pandorica was in fact a construct created by an alliance consisting of the Daleks, Cybermen, Nestene Consciousness, Judoon and the Sontarans along witha myriad of other races with the intention of preventing the Time Field from manifesting as that would destroy the universe. Their conclusions held that the Doctor would be responsible for the destruction of existence itself and thus used the lure of the Pandorica in order to entrap him. (DW: The Pandorica Opens)