Well God made flowers colorful so that they could easily attract bees and butterflies to go near them. By doing so they attract pollinators to ensure that their pollens are spread on other areas. When there pollens spreads, a new flower will grow. This is natures way of ensuring continuity of species. Because if flowers are not colorful the butterflies and bees might not spot them easily. In that case nobody will pollinate them. If they are not pollinated they will grow old and die without even creating or spreading their seeds on other areas since they have no feet and they can't walk.
Also God made flowers beautiful to give joy to everyone who sees it.