The Nazis do not allow music so much as demand it. It is one of their many twisted tools of controlling their prisoners. Making the prisoners sing and play music when such activities were far from their minds and inclinations was another way to dehumanize them. This is especially the case when the guards make the prisoners sing Nazi propaganda music and play military marches. The musicians are further dehumanized by being forbidden to play works of Beethoven, as they say Jews cannot play German music.
I also want to mention the subtle reference here to Psalm 137. This psalm tells of a time when the Jews were captive in the land of Babylon and forced by their captors to perform music for them. They ask the question of how is it possible to sing when they are in such a terrible situation. Although Elie Wiesel does not mention this reference directly, the parallels are clearly apparent.