"I know now, without a doubt, Kingdom Hearts is light!"
—-Sora
Kingdom Hearts is one of the major objects in the Kingdom Hearts universe. It is the heart of all worlds, and the source of great power and wisdom. It can be seen as the heart of everything.
In the first game, Xehanort's Heartless and the horde of villains led by Maleficent sought out Kingdom Hearts. Both wanted to draw out the darkness that surrounded it in order to gain immeasurable power and knowledge.
To accomplish this, Maleficent searched for the Seven Princesses of Heart, the maidens that possessed hearts that had absolutely no darkness within them. When brought together, these princesses would reveal the final keyhole and the way to Kingdom Hearts itself. Thus, Maleficent attacked many worlds with the Heartless in her pursuit of them, and managed to capture all seven.
All the while, she was being used by Xehanort's Heartless, who had been the first to discover the nature of hearts, as well as Kingdom Hearts itself.
At Hollow Bastion, Xehanort's previous residence, the seven princesses were finally gathered, but only when Sora sacrificed himself to release Kairi's heart using a Keyblade constructed from the hearts of the six other princesses, was the path to Kingdom Hearts finally opened. With Xehanort's Heartless having gained possession of Riku's body and forcing Riku's heart to wander into the darkness, he disappeared behind the darkness that poured out from the keyhole on the way to Kingdom Hearts.
After Sora was restored from his Heartless self, he once again went to Hollow Bastion, and sealed the Keyhole made by the princesses, holding off the great darkness. Regardless, Xehanort's Heartless remained a threat, so Sora and company ventured to the End of the World, a place created out of the remains of the worlds taken by the Heartless. There, the Heartless thrived, and beyond it, in the eternal abyss, lied the unlocked door to Kingdom Hearts.
After a long battle, Xehanort's wounded Heartless reached the endless abyss, where the Door to Darkness lay, with the Realm of Darkness and Kingdom Hearts waiting behind it. Xehanort's Heartless forced the door to open, hoping for Kingdom Hearts to fill him with the power of darkness. However, Kingdom Hearts was revealed not to be darkness, but light. The light overwhelmed him, destroying him. But even with his defeat, the darkness that surrounded Kingdom Hearts threatened to overwhelm the Realm of Light. In order to stop the Heartless threat, Sora was forced to close the Door to Darkness, trapping Riku and King Mickey on the other side. Nonetheless, the sealing also restored the destroyed worlds, along with the barriers between them, while preventing billions of Heartless from invading the Realm of Light.
The entire game, Organization XIII is trying to collect Hearts by destroying Heartless, in order to create their own Kingdom Hearts. In one scene, Xemnas shows the other Organization members how big their Kingdom Hearts is and how close they are to finishing it. After this scene, the world can be seen outside the windows of The Grey Room in Castle That Never Was as it slowly grows whilst Roxas and Xion gather hearts.
"Hear me, Kingdom Hearts! It seems we must begin anew. Ah, but know this: I will give to you as many hearts as it takes. Mark my words. You can no more be complete without me than I without you. Heed me, Kingdom Hearts! Lend me your power, so that we may be complete! The power to erase the fools that hinder us!"
—-Xemnas
Kingdom Hearts is again the goal of Xehanort in Kingdom Hearts II, but this time, it's his Nobody, Xemnas, and the Organization he leads. Maleficent, revived, also seeks out Kingdom Hearts once more.
However, Organization XIII wants Kingdom Hearts for an entirely different reason: they want to use its power in order to become whole, for they lead an incomplete existence as Nobodies. To fulfill their goal, Xemnas uses Sora (since Roxas, their original catalyst for releasing hearts, was no longer an independent entity), to destroy Heartless. The hearts that are released by Sora's Keyblade (and presumably all other Keyblades) would then wander to Kingdom Hearts, which floats over the Nobody world, The World That Never Was, as a heart-shaped moon, assimilating into it. When it is finished, the Organization would be able to become complete once more.
This plan is nearly realized until Ansem the Wise attempts to seal Kingdom Hearts away with a digital encoder. However, the machine is unable to process something as powerful and unpredictable as Kingdom Hearts, and it explodes, blowing Ansem to the Dark Margin and restoring Riku's original form. Still, this explosion leaves a giant hole in Kingdom Hearts, causing countless hearts to rain down over the world, becoming Heartless as soon as they touch the darkness. With Kingdom Hearts damaged, Xemnas needs to start all over again, though the threat of Sora forces him to take drastic action.
In order to gain the power to defeat Sora, Xemnas enters Kingdom Hearts, taking its power. Thankfully, a new door, much like the Door to Darkness, appears, allowing Sora and his companions to enter Kingdom Hearts as well. But Xemnas had already taken Kingdom Hearts' power, and attempts to use it against his opponents. Though he tries his best, and nearly succeeds, the combined efforts of Sora and his friends bring about his downfall. What ultimately happens to Kingdom Hearts after Xemnas' defeat is unknown.
In both the Kingdom Hearts II Final Mix secret ending "Birth by sleep" and the game Kingdom Hearts Birth by Sleep itself, it is unknown why Kingdom Hearts is colored light blue, rather than its normal pale yellow appearance.
In the mosaic above the door to Kingdom Hearts, a Hidden Mickey insignia can be seen.
According to Nomura in Director Secret Report XIII, it is implied that the differing colors of Kingdom Hearts is due to the nature of its assemblage. The Kingdom Hearts made by Organization XIII was assembled from the "hearts of men," meaning people's hearts were compiled into it. In Kingdom Hearts: Birth by Sleep, the X-Blade unlocked Kingdom Hearts from "the hearts of worlds," meaning the hearts of entire worlds were assembled for its creation.