The thrush is said to have belonged to an ancient breed known by Thorin's ancestors and they served the men of Dale as messengers. Bilbo is skeptical that any of the Lake-men still speak the thrush language, but is proven wrong when the bird tells Bard the Bowman of Smaug's only weak spot, thus enabling Bard to kill the dragon.
There is a verse featured in the book about how to get into Erebor (Translated by Elrond from the runes on Thror's map) that reads:
Stand by the grey stone when the thrush knocks, and the setting sun with the last light of Durin’s Day will shine upon the key-hole.
So it is there in the film to symbolise that Durin's day is approaching and the overthrow of Smaug and retaking of Erebor would soon come.