If the vegetables are present in the plant and turn yellow it means that the plant is not receiving good amounts of light so the photosynthetic activity is decreased.
Some other reasons include, in case of fruits, they ripen and so the colour changes to yellow. Yet some other vegetables turn yellow on spoiling which means their shelf life is over and cannot be used.