Why are only flowers coloured while rest of the plant is green?
A &B
Flowers are the reproductive organs of a plant. They have colorful petals, especially in those plants which are insect pollinated. They attract the insects for pollination. While the insects suck out nectar, stamens rub against insects' body. As this happens, pollens stick to insects' bodies and get transferred to the next flower they visit.
Rest of the plant is not involved in sexual reproduction and hence need not be colourful.
The above Image depicts sticking of pollen grains to the body of a bee.