A song indicates the type of bird, its sex, its age, its breeding condition, and whether it is paired and mated. Birds Sing Songs, Chatter, Call, Talk or Whistle for a variety of reasons. The distinction between songs and calls is based upon inflection, length, and context. Songs are longer and more complex and are associated with courtship and mating, while calls tend to serve such functions as alarms or keeping members of a flock in contact.
Just like other pets, birds have a need to communicate their feelings or emotions. Birds have their own unique way of communicating their desires through body language and through their voice.
Talking
A Bird talks when it is content and happy and wants to send a message to the another bird or it's owner.
Whistling
When a bird whistles it is communicating that the bird feels content, safe and is at ease in it's world.
Chattering
Some birds just like to talk, talk about anything; their environment, how they feel....so to communicate their thoughts, they chatter/chirp, sometimes incessantly, sometimes loud, sometimes soft. Young birds chirp or chatter when they want to be fed. Birds in the wild often chatter as a warning sign to other birds that something is not right in their environment, or as a call to attract another bird's attention.
Singing
While there are many reasons why a bird sings, it generally can be divided into:
When it is communicating a message to another bird.
When it is communicating a message to it's owner.
When it is content and happy and just feels like singing a song.

Although it is generally the male that sings to attract mates or defend territories, in some species the female joins in too.

Content Courtesy: www.all-birds.com