From the recent manga, we have seen that one of the things preventing Tobi from accomplishing his moons eye plan was Yahiko. Instead of blindly accepting what Tobi was saying, Yahiko stepped in and stopped Nagato from joining Tobi. We see Yahiko disagreeing with Tobi's description of 'true peace'. I also believe the way Yahiko saw the world and his philosophy on peace and hatred, is very similar to what Naruto's is.
Picture below shows the proof of Yahiko stepping in for Nagato and declining Tobi's offer.
Now, for Tobi's plan to succeed, he needed to be able to brainwash Nagato and to do this, needed to get rid of Yahiko. I believe Tobi would have had a say in the death of Yahiko, and probably edged on Hanzo in some way to make it seem like his fault. Most likely would have leaked some information to Hanzo in order to guarantee Yahiko's death.
Picture below shows the proof of Yahiko stepping in for Nagato and declining Tobi's offer.
You must be registered for see images