Well, both Kairi and Riku got the power to use the Keyblade in BBS, right? Riku intentionally and Kairi accidentally.
And Keyblade masters, or those just as strong, have the power to pass the Keyblade onto, and sense its power within, others.
Riku was destined to become a Keyblade master in the upcoming game, so... it's very possible that he, like Aqua, had the power to sense that Kairi had latent Keyblade abilities within her.
It's also possible that he had the power to activate that potential inside her.
How? I'm not sure. But their hearts are all connected through Sora, and he was in trouble at that moment.
The Keyblade certainly has a habit of appearing to new wielders in sticky situations.
As for the Keyblade itself, it always manifests as someone's true weapon (Sora's Kingdom Key, Ventus' Wayward Wind, etc.) and Destiny's Embrace is undoubtedly her true weapon.