It seems that David is being criticized here for calling Torah Zemiros. Rashi explains that he called Torah "Zemiros" when he was being hounded by his enemies (and wasn't able to study in depth), yet whatever Torah he learned was still a source of encouragement and joy for him.
Don't we find (Mishnah, end of Menachos) that even if a person is only able to learn a little bit, as long as he does it l'Shem Shamayim he will earn proper reward? Why should David be punished for what he did or said?
H. David Levine, Roanoke, VA. USA
1) Rav Yosef Shalom Elyashiv zt'l, in his Notes on Maseches Sotah, explains that the problem was not the amount, or the depth, of Torah that David learned when he was fleeing from his enemies, but rather the reason why he learned Torah at that time of crisis. Rashi writes that when David was on the run, he used the words of Torah "l'Shasheini", to "provide me with delight." This may mean that David was using the words of Torah as a way of distracting his attention from his fear of his enemies. Rashi writes "v'Agur," "I feared them," because he explains the word in the verse "Megurai" to mean "fear." David made use of the words of Torah in order to forget his troubles. There is a trace of sin in this attitude because he did not ascribe to the Torah the importance that it deserves.
Possibly in contemporary language we could say that David was utilizing Torah as psychiatric therapy, which lowers the true value of Torah.
2) Rav Yonasan Eibschitz zt'l gives a different explanation in Ye'aros Devash (#12). He understands the word "Megurai" differently from Rashi and translates it as "dwelling place." The Ye'aros Devash writes that learning Torah in one's house is not the same as learning it in the Beis ha'Midrash. When one learns Torah in the House of Study, he should try to sing the Torah with a melody. This creates a pleasant atmosphere for fellow students as well. However, when one learns at home he should not sing the Torah. This is because doing gives the appearance as if one is singing idol-worshippers' songs. This is why David said that the Torah became Zemiros specifically in "the house of my dwelling" because it is only there that one should not sing the Torah.
3) I think we see a common factor in these two explanations. The problem was that David was using the words of Torah either as a distracting game, or as something that sounded like a pagan song, both of which detract from the genuine value of Torah.
Kol Tuv,
Dovid Bloom