She remembered because of Sora holding her heart within himself.
On DI, she was completely honest about remembering nothing. Whether she remembered initially when she arrived on the island is completely unclear due to a lack of cut-scenes/information. But, while Kairi's heart rested in Sora, he was tapping into her memories. This is one of the memories that could have been buried within Kairi's subconscious and it needed a catalyst to be remembered.
Perhaps this will be answered in DDD? Isn't it supposed to deal with Sora unlocking memories that are on the other side of his heart? Sounds like Kairi will have to do the same. It just depends on how important to the plot the writers will make it.