Music (Score)
When the folks at Pixar were working on Toy Story, the Disney big wigs kept pushing for the film to become a musical. It made sense in a way. Disney had had huge success with cartoon musicals like The Little Mermaid, Beauty and the Beast, and Aladdin. Why not make the first fully computer-animated cartoon a songfest, too? Seemed like a win.
But, John Lasseter didn't think it was such a hot idea. Joss Whedon, who was working on the screenplay at the time agreed. He said that Toy Story was a buddy comedy and that meant it was "about people who won't admit what they want, much less sing about it." (Source)
Eventually Disney and Pixar comprised. The characters wouldn't burst into song, but the movie would feature musical moments, which would reveal their inner feelings instead. It's a win-win.
They've Got a Friend in Randy
Enter Randy Newman. By the time he was asked to work on the score for Toy Story, Newman was already a super accomplished songwriter and performer who'd been nominated for six Academy Awards. He'd get nominated yet again for his work on Toy Story—once for Best Original Score and once for Best Original Song for "You've Got a Friend in Me."
Newman composed all the instrumental music for the film and three original songs to add to the mood in three different scenes. "You Got a Friend in Me" sets the tone for the film while Andy plays with his best buddy/toy in the whole wide world—Woody. "Strange Things" comes on as Buzz gets more and more playtime with Andy. And the final song, "I Will Go Sailing No More," plays during Buzz's big moment of realization. He's just found out he's a toy—not a space ranger—but maybe he can still fly.
Maybe.
In the end, the music works because it adds to the story without actually requiring the characters to spell out what they're feeling. Don't get us wrong, we love Disney musicals, but we're pretty glad we never had to watch Mr. Potato Head or (yeesh) Sid burst into song.