Jackie, energy from sunlight is absorbed by chlorophyll. Chlorophyll is the green pigment in the plant's leaves and stem. It does the work of photosynthesis.
Photosynthesis converts carbon dioxide into sugars and the potato converts those sugars into starch and stores it in the tubers.
Only a small amount of the nutrients in the tuber comes from the soil or other planting medium like hay.
As an example, potassium doesn't come from photosynthesis and must be available to the plant in the soil. Potassium is thought of as an important plant nutrient. But by weight, a potato tuber is only .005% potassium. That's a tiny amount.
a 148 gram potato contains 720 mg of potassium: 720/148,000 = .005
If other things are equal, the more potato leaves that are exposed to sunlight; the more sugars will be made through photosynthesis; the more starch will be stored in tubers; the more tubers will be under the plant.
Steve