I've always assumed that, since only the males have the bright colours it is for attracting mates. I have no idea how such a thing came about, but maybe it is as simple as brighter males stand out more and will hence get picked - it seems most male bird species impress potential mates with colour and grandeur.
Of course, the power of attraction and females are attracted to bright and flashy. Interesting that women are also attracted to fright / flashy jewellery, l wonder if there is a direct relationship??