There are a couple of different phases in photosynthesis. First, there is the light dependant phase; that part needs sunlight for it to be able to function properly. The next phase is the calvin cycle, and that system does not necessarily need sunlight. However, many people believe that since the calvin cycle cannot happen without the light dependent phase first, than the calvin cycle ultimately depends on the sun as well.
I guess that the Calvin cycle indirectly needs sunlight, because the products of the light dependent phase: 02 (oxygen), NADPH (a high-energy reducing molecule), and ATP (stores energy) are then used in the calvin cycle. Without the sunlight from the first phase of photosynthesis, the second phase could not happen at all!
What does the Calvin Cycle do anyway? Well first, the Carbon product from the light dependent phase attaches to a biphosphate molecule called RuBP. This splits into two pieces, resulting in two molecules (3 carbons in each) of phosphoglycerate. Many other complicated steps and procedures occur which make use of the products from the light dependent phase. Ultimately at the end of this process, the plants get the energy that they need to survive.
The Calvin cycle and the light dependent phase work together with the help of sunlight to give plants the energy they need.