Remember that the equation for photosynthesis is:
carbon dioxide + water (+ light energy) → glucose + oxygen
Let's see how plants get the carbon dioxide and water they need for this process.
Plants get carbon dioxide from the air through their leaves. The carbon dioxide diffuses through small holes in the underside of the leaf called stomata. (One of these holes is called a stoma. The plural is stomata.)
The lower part of the leaf has loose-fitting cells, to allow carbon dioxide to reach the other cells in the leaf. This also allow the oxygen produced in photosynthesis to leave the leaf easily.
A leaf usually has a large surface area, so that it can absorb a lot of light. Its top surface is protected from water loss, disease and weather damage by a waxy layer.
The upper part of the leaf is where the light falls, and it contains a type of cell called a palisade cell. This is adapted to absorb a lot of light. It has lots of chloroplasts and is shaped like a tall box.
Plants get the water they need for photosynthesis through their roots.
The roots have a type of cell called a root hair cell - these project out from the root into the soil. Roots have a big surface area and thin walls, which allow water to pass into them easily.
Note that root cells do not contain chloroplasts, as they are normally in the dark and cannot photosynthesise.
The water absorbed by the root hair cells passes through the plant in xylem tubes, and eventually reachers the leaves. If a plant does not absorb enough water, it will wilt or go floppy. Without water it may also not photosynthesise quickly enough, and it may die.