Seeing the world in trichromatic color is a wonderful thing. I truly feel for those who can't. Humans, by and large, have pretty decent color vision. We have three different kinds of opsins on our cones which allows us to see the variety in hues that we do. It is a trait we share with apes and most Old World monkeys. Why do we possess such a wonderful adaptation? As it turns out, plants were likely the driving factor.
Whereas most mammals tend to have only two different kinds of opsins (dichromacy), the primate lineage from which we evolved developed trichromacy at some point in the past. Why did this happen? The answer may lie in the diet of our common ancestors. As climates changed over time, the common ancestors of Old World monkeys, apes and humans had to constantly adapt to new food sources. A majority of primate diets consist of fruits and leaves. Being able to distinguish between ripe and unripe fruit would be a valuable advantage to have. For our ancestors, dichromacy would have made this quite difficult. Thus the evolution of trichromacy would have incurred quite a selective advantage to our ancestors.
The advantage doesn't end with ripe vs. unripe either. Trichromacy would have also made finding colorful fruits against a backdrop of green much easier as well. Even for the majority of primates that eat leaves, color vision would have been quite useful. Leaves can vary in edibility and even toxicity with age. Being able to tell younger from older leaves could easily make the difference between life and death for these primates. Leaf color is often the only way this can be done. Again, selection for color vision would have quickly spread through these populations. So, the next time you stop to admire a flower or any of the wonderful colors of the world around you, take a moment to think about the fact that plants just might be the reason you can enjoy that wonderful sense.
Further Reading:
http://anthro.palomar.edu/primate/color.htm
http://rspb.royalsocietypublishing.org/content/263/1370/593
http://www.sciencedirect.com/science/article/pii/S0047248402001677