They turn pink as they get older, because of the foods they eat. Mostly they like to eat shrimp and algae, and there are pigments in these foods called carotenoids, which cause them to turn pink.
These same pigments, carotenoids, are in some of the foods that we eat too, like carrots! This is why there is some truth when people say that you’ll turn orange if you eat too many carrots.
There are six different kinds of flamingos that are found in different places in the world. They eat slightly different things, and so they are slightly different colours of pink. You can check them out here: http://www.flamingoresources.org/species.html