Light (sunlight or artificial light) is one of the most important factors of Gardening. In the presence of light plants bind water and carbon Di-oxide (CO2) into sugar which is being used as food.
This sugar is also used to form new cells, to thicken cell walls and to develop flowers and fruits. Plants effectiveness to produce sugar is normally proportional to the intensity of light (until its too hot or too cold to survive).
In case the plant bears fruits or flowers, it requires much more energy than those which only grow leaves.
In case you are only interested in the leaves (like in the case of spinach or lettuce) Light might not be a major issue. Keep the plants to a minimum of six to eight hours in direct light in case you are looking for fruits.
The results can be very frustrating if you try to grow Tomatoes, Eggplants or peepers in the shade. There is a fair chance that you might come up with a good and healthy green plant without any fruit.
Root crops such as beets, Carrots, Radishes do well in partial shade as they store up their energy before they flower. Plants like Lettuce and Spinach are mostly tolerant of shade. In case of very hot and bright light, they need protection.
Only Mushrooms can be produced in total darkness.
I hope the article has cleared some doubts regarding sunlight exposure of the plant. If you have any other query please provide your feedback in the form of comments.