What is dramatic significance of the song in Act II of Waiting for Godot?
First, an interesting fact--Brecht had used the same song in his play Drums in The Night much earlier. His usage of the song had more overt political reasons than Beckett's where the former wanted to highlight the capitalist assault and the communist solidarity through the dogs coming in and digging a tomb for the dead dog.
In Beckett's play, the political angle of the commune is not missing from the song especially since it is Vladimir who sings this song. If one looks at the second act carefully, all the speeches of Vladimir tend toward the collective e.g. the 'was I sleeping' speech.
But, I think the song is also important in the way it underscores the infinitesimal repetitiveness of the situation at hand. The song gives us the impression that it will never end and the end will go back to the beginning. The circular structure of repetition echoes the form and the content of Beckett's play.
The song must be seen as a part of the farcical and vaudeville song-dance routine that the tramps set up.
There are pauses, interruptions in course of its rendering and all these gaps carry forward a sense of incompleteness and deferment that otherwise lies at the core of the world that the play projects.
There is the allusion to theft and punishment in the song. The two thieves of Matthew and Augustine are crucial to Beckett's play and they carry on their shoulders the fine balance of salvation and damnation. In the reference to the 'crust of bread', there is possibly a Christian symbolism at work too. The Kafkaesque dog-god (Christ, here) parallel may be operative here.
There is a self-reflexivity to the song that characterizes the Beckettian signature style. The inscription on the tombstone retells the whole story in the form of a meta-narrative or a narrative within the narrative. Here both the basic and the meta-narratives are the same and this sameness is also a trope of repetition.