The difference between Smaug and the dwarves is that the dwarves’ relatives created the treasures, and Smaug just steals them.
When Gandalf and the dwarves arrive at Bilbo’s house to explain the treasure hunt to him, it is clear right away that it is more than just a treasure hunt to them. The dwarves are actually trying to regain their homeland from the dragon. The dragon, Smaug, stole not only the treasure from the dwarves, but their way of life.
Notice that the dwarves have been essentially nomads since the dragon left. They have been wandering, hiring themselves out to do what work they can, because when the dragon hid himself in their mountain with their treasure, he did not just take their treasure—he took their home as well. Thorin is not just trying to get their gold back. He is also trying to regain their self-respect.
The dwarves have a great deal of skill, and their arts with metalwork are greatly admired by many. However, the dragon has no skill. All he does is steal and destroy. There is another way in which he is different.
Dragons steal gold and jewels, you know, from men and elves and dwarves, wherever they can find them; and they guard their plunder as long as they live (which is practically forever, unless they are killed), and never enjoy a brass ring of it. (Ch. 1)
From the gold, the dwarves get not only the satisfaction of a job well done, but also knowing that others get pleasure from their work. Apparently dragons just take for the taking and kill for the killing. They seem to not enjoy the gold they steal, and just acquire it and sit on it like a miser.
At the end, when Thorin gets into the mountain, he does seem to get a bit of the "dragon-sickness" over the gold (Ch. 19). He loses his reason, or at least Bilbo thinks he does.
"To the treasure of my people no man has a claim, because Smaug who stole it from us also robbed him of life or home. The treasure was not his that his evil deeds should be amended with a share of it...." (Ch. 15)
This is why Bilbo takes the Arkenstone, so that he can negotiate with the men and elves. He does not think Thorin will. Thorin considers this a betrayal. The Arkenstone was his birthright, because it was a symbol of his heritage. Its worth lies not in its value, but in what it means to the dwarves.
In the end, everyone does get what they want. Bilbo's quick thinking with the Arkenstone is fortuitous, because the Battle of the Five Armies is at hand. Thorin forgives Bilbo, just in time. Bilbo also realizes that while adventures are all well and good, he would rather return to the Shire--at least until the next adventure.
Tolkien seems to be making a statement about the morality of desire. For the dwarves, because they want to return to their homeland, wanting the treasure is acceptable. For the dragon, wanting it just to want it is wrong. Bilbo takes the trip because he wants to help the dwarves regain their homeland, and doesn't want to be called a coward (or a grocer). He is also basically just curious. Never at any point does he demonstrate greed. Thorin's greed is not so much for gold as it is to regain what he lost, and what his people lost. Thorin is a king without a kingdom.