It is used when you want to tell someone something, but don’t want to tell them how you found out about it.
For Example:
Jon tells Sally that his company is doing really well. Sally tells her friend Joan to buy stock in the company. When Joan asks how Sally knows to do so, Sally says “A little bird told me.”