flowers are colourful to attract the insects that they need to reproduce, it is a handy side effect that we think they are pretty.