In order to better understand their own nature, Organization XIII sought to perform research on the nature of Nobodies and the mechanics of memories, with a secondary, secret purpose for Xemnas of uncovering "something important related to 'memory'". To this end, they conducted experiments located at Castle Oblivion, a location that affects memories, and involving Naminé, a Nobody who affects memories. They constructed the Pods as part of these experiments into breaking and recovering memories.
After defeating Marluxia, Sora meets with Naminé in a room within Castle Oblivion and she offers to reconstruct his memories. However, due to the extent of the damage, he, Donald, and Goofy would have to go into stasis within the Pods, in order to keep them safe and cared for while Naminé conducts her task.
After defeating the Riku-Replica within the castle's Twilight Town-styled basement, Riku meets with Naminé and is shown Sora sleeping in his Pod. Naminé offers to use her powers to seal away Riku's memories, permanently locking away Ansem, but Riku refuses, and instead asks her to promise to look after Sora.
DiZ works with Naminé to restore Sora's memories as he slumbers in the Pod. He persuaded her to move the Pods to his secure laboratory in the basement of Twilight Town's Old Mansion, as Castle Oblivion was too at risk to intrusion by Organization XIII. During the reconstruction, he digitized himself and his research on Roxas, Axel, Naminé, Xion, Terra, Ventus, and Aqua, and hid them within Sora's memories, hoping they could eventually be used to find these lost friends. 
After being placed within The Other Twilight Town, Roxas begins reliving Sora's memories in earnest, via his dreams. One of these dreams includes a distorted memory of Sora meeting with Naminé at Castle Oblivion—in this version of the memory, he reaches her room at the top of Castle Oblivion, but she surprises him by drawing a sketch him inside of a Pod, which then sprouts around him and closes.
On the last day of Roxas's summer vacation within the simulation, it is attacked in earnest by Axel and the Organization's Nobodies. DiZ calls him to the Old Mansion, so Roxas makes his way there. He fends off the Nobodies as he explores the building, and eventually discovers DiZ's basement laboratory. He passes by Donald and Goofy's Pods in the Basement Corridor, stirring recognition, before reaching the Pod Room presided over by Sora's Pod. DiZ sends a digital projection of himself into the simulation to confront Roxas, exhorting him to rejoin with Sora so that Sora will have the power to destroy the Organization. Roxas attempts to attack the projection, but it merely vanishes. With Roxas there and Naminé's work done, Sora's Pod opens and Roxas is absorbed back into him, as the boy accepts his fate.
At the same time, in the real Twilight Town, Sora and his friends awaken within their Pods and emerge, marking the start of a new journey. Upon closer inspection, Sora and his friends discover that the other pods situated in the laboratory had been previously used by unknown parties, and had been powered down.
Sora's Pod, watched over by Naminé, appears in the Journal's data reconstruction of Castle Oblivion just as it was when the original Sora met with Naminé.
The Pods are crystalline devices that resemble a marble structure in the shape of an lotus flower bud while closed. They open by "blooming", revealing a crystalline chamber within covered by circuitry. The crystal is usually transparent when not in use. The interior of the pods is completely blackand gives the illusion of a large, shadowy room. They can come in multiple sizes, as Donald and Goofy sleep within small Pods arranged in rows in the Basement Corridor, while Sora sleeps within a much larger Pod placed by itself in the Pod Room.
The Pods' physical resemblance to the lotus flower may be an indirect reference to the unrelated lotus tree, which in Greek mythology was said to cause those who ate it to forget their friends and homes, and lose their desire to return home, similar to the Organization's manipulation of Sora in Kingdom Hearts Chain of Memories.
Notes and references
- Director's Secret Report XIII, p. 27-28; Interviewer: "There are also many things regarding Castle Oblivion that remain mysterious. Did Organization XIII build that castle themselves, with Naminé the original subject of the experiments they conducted there? Please tell us the details of the experiments the Organization were carrying out. Also, was that pod that Sora entered something the Organization built in relation to those experiments? Are they the same pods in Twilight Town?" / Tetsuya Nomura: "The ultimate goal of the Organization was to obtain a Kingdom Hearts of the hearts of people and become complete beings, and because Nobodies were a new kind of being beyond all expectations, said to be "nonexistent beings", the lack of background knowledge made it necessary for them to collect information relating to their own condition. One major feature of the Nobodies is that they form personalities and feelings through memories without hearts. This means that "memory" is a very important element to them. The creation of Castle Oblivion itself is still a mystery, but, as you can guess from the cutscenes added to this title, you may consider that the Organization discovered the castle, which was there since before the Organization was created, at quite an early stage.
And also, around the same time that Roxas woke up in Twilight Town, Naminé woke up in Castle Oblivion. This means that she was found by the Organization after that. Just as each Organization member has an attribute ability, Naminé possesses the power to manipulate "memory", and they thought that this ability was the key to illuminating the truths of the condition of the Nobodies. This means that in that place that affected the "memory" of those who entered they carried out experiments relating to memory. Above all, Xemnas, the leader of the Organization, seemed to be searching for something important related to "memory". Some of their experiments involved the breaking and rebirth of memories, and those pods were for that purpose indeed created by the Organization. The pod that Sora woke up in in Twilight Town was the same one from Castle Oblivion. DiZ had moved everything as it was in order to escape pursuit by the Organization. Also, as Xigbar says in a cutscene added to this title: when the time comes to reveal the details of "the true purpose of Castle Oblivion", all the mysteries regarding Castle Oblivion will be solved."" Translation via Goldpanner.
- Kingdom Hearts Chain of Memories, Donald: "To remember again, we have to sleep in that?" / Naminé: "Yes. It's going to take a little time, but I'll take care of you."
- Kingdom Hearts 3D: Dream Drop Distance, Chronicle: Chain of Memories: "She offered him a choice: he could either put his scattered memories back the way they were and lose all memory of this castle, or keep his memories the way they were now. Sora chose to get his old memories back by going into a deep sleep until they could be repaired."
- Kingdom Hearts Chain of Memories, Riku's Tale VI: "When he found her, he also found Sora and friends in a deep slumber, waiting to get their lost memories back. Namine told Riku he could seal Ansem away forever by giving up his memories, but Riku refused to forget his friends."
- Kingdom Hearts 358/2 Days, Riku: "You made me a promise." / Naminé: "To look after Sora. I remember. I'm sorry...I'm not sure I've kept that promise very well."
- Kingdom Hearts Re:coded, Naminé: "These people are waiting for Sora—the only one who can put an end to their hurt. DiZ told me...he hid something inside you during the year you were asleep. I asked him what, and all he would say was that he was "clearing his conscience." Sora must be the key to saving the people you saw—"
- Kingdom Hearts 3D: Dream Drop Distance, Ansem the Wise: "Perhaps I wanted to atone for events of the past, even if no apology can undo the harm I have wrought. I felt...that I ought to leave at least something behind. So I digitized myself and my research, and hid them within Sora."
- Kingdom Hearts II, DiZ: "Roxas, to the mansion! The time has come!"
- Kingdom Hearts II, Roxas: "...Donald...Goofy?"
- Kingdom Hearts II, DiZ: "My apologies. This is only a data-based projection."
- Kingdom Hearts 3D: Dream Drop Distance, Chronicle: Kingdom Hearts II: "On the last day of his vacation, Roxas remembered who he really was and what he had been trying to do. He found Sora sleeping in a pod, and realized his summer vacation would have to end."
- Kingdom Hearts II, Twilight Town: "Guided by a voice calling out to him, Sora awoke in a mysterious old mansion. He must have been sleeping there for a long time, but he couldn't remember a thing."
- Kingdom Hearts II: "There's evidence that this was used before." / "This hasn't been used in a while." / "This looks like it could still be used." / "It seems only the power is on." / "Who built this? And for what purpose?"
- Dictionary of Phrase and Fable, page 526, by Ebenezer Cobham Brewer