As a graduate student, I wrote nerdy STEM songs as a form of self-amusement. When I began postdoctoral teaching, I threw in an occasional song, and my students responded positively. Ever since then, my colleagues and I have worked to define the conditions under which content-rich music is most helpful for teaching and learning.
Here are two representative papers -- one on student science songwriting, and one on students' reactions to instructor-provided songs. (Listings of additional papers can be found in my CV.)