The role of music in the movie
One of the screenwriters and producers of the movie, and director, Julia Hart's husband, Jordan Horowitz, was also a producer on LaLa Land – so he knew a thing or two about musical movies. The music in the movie sets a nostalgic tone and together with the colorscheme provides it with a slight “fairytale” vibe.
In the movie, music was not only important for Stargirl but also for Leo's character development. It was ultimately what allowed Leo to reconnect with his dad and come out of his shell. That Stargirl also sang and played was important in triggering Leo's own interest in singing. And then Stargirls own production numbers served to highlight how popular she had become at Mica. It set the stage for her later downfall by providing emotional contrast to later scenes in which she was more subdued having been rejected by her classmates.
Music was Stargirls road to acceptance and Leo's road to self-discovery and confidence building.
Filming locations for Grace’s singing parts
The first "Be True to Your School" and "We Got the Beat" were filmed at Moriarty High School, Moriarty, NM. The second "Be True to Your School" was filmed at Valencia High School, Valencia, NM. Trivia time - the best way to tell these two football fields apart is the color of the track around the field (black vs maroon).
Then Stargirl has a brief uke teaching moment in the courtyard at Valencia High School (Give Me Love(Give Me Peace On Earth) by George Harrison)
(Thanks for input from Vandervault user aldri49501)