In Kingdom Hearts II, Kairi wrote a letter to Sora. She wrote it the day before Roxas's mind made contact with Kairi's. She put it in the water at the coast of the mainland, explaining to her friend, Selphie, that she started to remember Sora's name.
On the fourth day, after Roxas makes contact with Kairi's heart, she goes to the shore and releases a letter in a bottle into the surf. As it drifts away, she tells Selphie she wrote it to the boy she can't remember, telling him she'd find him one day.
After defeating Xemnas, Sora and Riku are stranded at the Dark Margin. While sitting on the shore, they find the bottle washed up on the shore. Riku takes out the letter, looks it over, and says to Sora, "I think it's for you." Sora reads the letter out loud, and the Door to Light appears before them. Sora stands up and offers a hand to Riku, who gets to his feet. They walk into the light and suddenly find themselves falling through the sky over Destiny Islands. They splash down into the water, and they are met at the shore by Kairi, along with Donald, Goofy, and Mickey.