In Naruto, it was said that you need both Senju and Uchiha DNA to achieve Rinnegan, right? So why didn't Danzo get Rinnegan? He had Senju DNA holding Uchiha DNA.
Well, that's becasue you also need to be competent enough to master both these powers.
Madara was strong enough, and was able to awaken it. Danzo however, was not.
Danzo's DNA originates from experiments and body modifications. He wasn't a "Natural", while Madara had natural mastery over the Uchiha powers, and after being defeated by Hashirama, mastery over the Senju powers.
It was also implied that you need to be very close to the end of your lifespan to awaken the Rinnegan.
Edit - Spoilers!
Based on the recent chapters, it is implied that it isn't Senju + Uchiha which is needed to awaken the Rinnegan, but Indra's and Ashura's (Sage of Six Paths' sons) chakras. That is why Madara (the incarnation of Indra) was able to awaken them after implanting Hashirama's (the incarnation of Ashura) cells into his wounds.
Danzo was not able to awaken the rinnegan because he had senju DNA and Uchiha eyes but had neither enough chakra to effectively utilize either ability (hashirama' s wood style or the sharingan in his arms). While madara was an Uchiha who implanted hashirama's DNA throughout his whole body he did not awaken the rinnegan until he was near death. It would not be expected for someone like Danzo to be capable of manifesting the rinnegan, at least at the point in time that he was living.