We can only guess Yoda knew it was Anakin because of how he spoke to Obi-Wan, (simply because it's not apparent). Somehow Yoda was able to glean that it was Anakin whodunit. If he was able to sense all the Jedi dying across the galaxy when he was on Kashyyyyyyk, he might be able to glean who it was who killed everyone in the temple.
Perhaps through the force he was able to see the past and look upon the face of the killer.
Originally posted by Exador
The Dark Side was clouding the Jedi's use of the force. Remember in Ep II, Mace said: "I think it is time to inform the senate that our ability to use the force is diminished".
Re: How Did Yoda Know...
Originally posted by Exador
When Yoda said "If Into The Security Recordings You Go, Only Pain Will You Find" I Saw How He Reacted. I Saw The Movie Four Times In Theaters. If He Reacted That Way, How Did He Know That Anakin was the one who killed the Jedi knights in the Temple
It's called intuition. Trusting your instincts and feelings.