I couldn't quite make out what the lyrics were to the song they sang in Bilbo's house. What song was that, and why did they sing it?
It was an old dwarvish song, presumably originating from a time not long after Smaug took over the Lonely Mountain. It describes a desire to return to reclaim their home under the mountain, primarily for the earthly treasure located there (the song describes in great detail the nature of the various treasures). Later verses in the song also briefly narrate the story of Smaug coming and destroying the town of Dale, forcing the dwarves to flee.
Here are the lyrics from the song as recorded in the book:
Someone else may have to indicate if the lyrics in the movie substantially differ from those in the book (I haven't seen it, yet!)
As to your question concerning why they sing it, I've always likened it to ancient Israelite songs of returning to Zion or American slavery spirituals -- such singing provides inspiration, motivation, and community, keeping a focus across generations on a cultural goal that holds deep, deep significance for a group of people. The song was likely ingrained in the dwarves' cultural heritage, perhaps being sung in their homes, their churches, their schools, etc. Because of this, when the dwarves are at Bilbo's house, ready to finally start this journey that all their people had been singing about for so long, they couldn't hold back, and that song seemed the best choice for communicating their excitement and sense of fulfillment.
They cut out a lot of the lyrics from the original from the books.
The full lyrics: http://heirsofdurin.files.wordpress.com/2012/01/lyrics-misty2-copy.jpg.
The one in the movie: Far over the misty mountains cold. To dungeons deep, and caverns old. We must away,at break of day. To find our long forgotten gold. The pines were roaring on the height. The winds were moaning in the night. The fire was red, it flaming spread. The trees like torches blazed with light.