Different colors of fruits and vegetables

Why do we need to eat fruits and vegetables with different colors?