Encounter Darkrai
Your first encounter with Darkrai will not take place until the very end of the game, after you complete the official storyline and defeat Regigigas. Play at least three more "days" of game time exploring the landscape and leveling up. A minimum of three days later, you will wake up with a disturbing dream featuring Darkrai, who controlled Regigigas behind the scenes, and Cresselia, a psychic Pokemon who claims that you are disturbing the world's balance and must seek Darkrai. Once you see this dream, you can enter Mt. Travail.
Fight Darkrai
You cannot recruit Darkrai immediately. You must complete the Mt. Travail quest and make your way to Darkrai, who resides in the Dark Crater that unlocks after you complete Mt. Travail. Beforehand, you will have to battle other Pokemon, including Palkia. Cresselia will fight alongside you. Battle Darkrai with ghost type or other dark type attacks, which will deal damaging blows to his dark type affinity. Do not fight Darkrai with psychic type attacks, as he is immune.
Darkrai's Fate
If you successfully defeat the optional game boss, Darkrai, you will notice that Darkrai's fate is open ended. Rather than perishing, Darkrai succumbs to amnesia. Cresselia tells you that Darkrai will now wander around the land and since he has forgotten his wicked plans, he is no threat to anyone anymore. This is your cue that Darkrai is now available for recruiting, as you can encounter him like you would encounter other Pokemon. Unfortunately, this is at the end of the game beyond even the bonus ending, so there is not much to do with Darkrai other than continue to explore the land.
Recruiting Darkrai
You cannot recruit Darkrai until after you defeat him in the Dark Crater. Afterwards, he will start appearing in the 13th floor of the Mystifying Forest, the second floor of the Deep Crevice Cave, the 17th floor of Mt. Travail, the 14th floor of Special Rift and the third floor of Miracle Sea. The Miracle Sea third floor is your best chance at encountering him to recruit him. Battle Darkrai again and the recruit option will automatically become available to you. Put escape orbs into your inventory before you head to the Miracle Sea so that you can exit the area if you find Darkrai's strength too overpowering. Level up, return and try again.