He didn't. Snape killed Dumbledore. If you mean why did Draco take possessionof the Elder wand it was because Harry stole Draco's wand so therefore the ownership of the Elder wand from Harry to Draco. But why Harry gained possession of the Elder wand I don't know. Can someone else answer this please?
Draco defeated Dumbledore because the split second Dumbledore had to defend himself was used instead to freeze Harry with his invisibility cloak on so he would survive. Draco then disarmed Dumbledore right after Dumbledore froze Harry. Well read Half-Blood Prince to find out what happened after. It's in the chapter called: "The Lightning-struck Tower. Also, in answering the person who tried to answer before me, Draco disarmed Dumbledore, therefore Draco defeated Dumbledore and gained the Elder Wand's allegiance even though he never knew it. Remember you don't have to kill the previous owner of the Elder Wand to master it. It just often happened that way as it attracted so many dark wizards. Harry then gained the Elder Wand's allegiance as he disarmed Draco in The Deathly Hallows when they were escaping with Dobby's help from Malfoy Manor and the imminent arrival of Voldemort.