In the novelization it is clear that Yoda does know who did it:
Obi-Wan stepped over white-armored bodies to kneel beside blaster-burned corpses of children. Tears flowed freely down tracks that hadn't had a chance to dry since he'd first entered the Temple.
"Not even the younglings survived. It looks like they made a stand here."
Yoda's face creased with ancient sadness. "Or trying to flee they were, with some turning back to slow the pursuit."
Obi-Wan turned to another body, an older one, a Jedi fully mature and beyond. Grief punched a gasp from his chest. "Master Yoda—it's the Troll..."
Yoda looked over and nodded bleakly. "Abandon his young students, Cin Drallig would not."
Obi-Wan sank to his knees beside the fallen Jedi. "He was my lightsaber instructor..."
"And his, was I," Yoda said. "Cripple us, grief will, if let it we do."
"I know. But... it's one thing to know a friend is dead, Master Yoda. It's another to find his body..."
"Yes." Yoda moved closer. With his gimer stick, he pointed at a bloodless gash in Drallig's shoulder that had cloven deep into his chest. "Yes, it is. See this, do you? This wound, no blaster could make."
An icy void opened in Obi-Wan's heart. It swallowed his pain and his grief, leaving behind a precariously empty calm.
He whispered, "A lightsaber?"
"Business with the recall beacon, have we still." Yoda pointed with his stick at figures winding toward them among the trees and pools. "Returning, the clones are."
Obi-Wan rose. "I will learn who did this."
"Learn?" Yoda shook his head sadly. "Know already, you do," he said, and hobbled off into the gloom.
What is not very clear (at least not in absolute and digested terms at that very moment) is exactly how he knew. But, throughout the novelization and the movies Yoda's distrust and general "bad feeling about this" towards Anakin is very apparent. He knows what Anakin is capable of through his inability to control his anger ever since he was a child. He also knows that Anakin has mastered the lightsaber to an extent where he would easily defeat Cin Drallig (Yoda's own student) who was protecting the children. So it is not entirely inconcievable that knowing a lightsaber did the killing, Yoda would put two and two together and come up with Anakin as the culprit.
Killed not by clones, this Padawan. By a lightsaber, he was.
- Maybe then he started putting the pieces together...