Where was Danzo when Pain attacked? When Naruto arrived, he and the toads fought Pain. The only other people of the Hidden Leaf, in my opinion, who were powerful enough to help would be:


Kakashi and other dead people
Guy—not in the village
Tsunade—in a comma
The Uchihas—seemingly defected from the Leaf
Danzo


Where was Danzo? He would not have wanted the Leaf to be destroyed, so I would imagine he would help here and also when Orochimaru attacked the Leaf in part 1.

Is there any hard evidence to support why Danzo didn't help in either attack?
Danzo was in Konoha at the time of Pain's attack, at the Root organization's HQ. He even plays a role in the plot. 

He first tells Koharu Utatane and Homura Mitokado that Tsunade was risking the loss of Fourth Hokage's legacy by recalling Naruto from Myobokuzan to the village. (Occurs in anime only.) He then kills the messenger frog Kosuke, left behind by Fukasaku to prevent the news of Pain's attack from reaching Naruto, so that the Kyuubi doesn't fall in Akatsuki's hands.

He doesn't help the village for political reasons. He knows that using Katsuyu's healing, Tsunade would prevent a total destruction of the village. He could then lie low until Tsunade is removed from power, and then become the Hokage himself. (see images below, taken from Chapter 421 and 424.)

His not helping during Orochimaru's invasion was also presumably for the same reason, that is, to try to remove Hiruzen from power and become Hokage himself. Either that, or Kishimoto had not planned for Danzo at the time.