The capability to produce human food on a continuing basis is the single most limiting component of human life support in space that presently cannot be accomplished by physico-chemical means. Plants are maintained in growth chambers where environmental conditions, like lighting, nutrient supply, temperature and humidity, can be strictly controlled by computer. It is unlikely that crops will be grown using sunlight, especially during surface operations. On Mars, for example, sunlight is only available for half of each rotation period.
More light is required for optimal growth of many plant species.
In addition, the sun can be obscured for months at a time by the giant dust storms on Mars. This could put the crew in jeopardy. CEA crops will probably be grown using some form of hydroponics, whether this be directly in liquid media, having the roots in contact with a thin film of liquid, having the roots in contact with a porous pipe that carries media, or in some porous matrix like vermiculite. Growth media containing the minerals needed for plant growth will likely be formulated from minerals recovered from the waste stream supplemented by stowed materials. Water transpired by the plants can be collected and used as drinking water for the crew.