It comes from the Gemara in Sanhedrin. The Gemara’s example is someone who sings a Pasuk out of Shir Hashirim. The Torah puts on a sackcloth and complains to Hashem, “Your children made me into a harp and an organ!” It is pretty obvious that the point is that he is using the Torah for his own pleasures, that he is singing that Passuk to a person. Sort of the way people write Ani Ledodi Vedodi Li. It is talking about Hashem and Knesses Yisroel, and it is used to a person. So, if you sing a Passuk like that, you are turning to the Torah for personal poetry and romance.
I don’t think it applies to singing out a Passuk from Tehillim or wherever for the sake of singing the Passuk.