In Five Nights at Freddy's 2, the Music Box is one of your most important tools for survival. Its main purpose is to keep "The Puppet" pacified inside its box.
While the music is playing, you are completely safe from the Puppet. But if the song winds down, the Puppet begins to emerge, and once it fully leaves the box, an attack is almost unavoidable — you have only a short window before it reaches you, with your sole hope being the clock striking 6 AM first.
To hold it back, you must repeatedly wind the box. The catch is that while you are looking at the monitor to do so, you cannot see the other animatronics moving around. That forces a constant risk-versus-reward decision: wind it fully and less often, or in shorter bursts more frequently.
The Music Box is also why you cannot simply hide behind the Freddy mask all night. Other animatronics ignore the mask, but the Puppet is not fooled, and you cannot view the monitor while wearing it to keep the box wound.