During photosynthesis, light energy, combined with water and CO2 gas, make a sugar called glucose.
Glucose has to go through another process called cellular respiration in order for the glucose to be changed into usable energy that would be useful for the plant.
The stem relies on the pressure of the plant cells to maintain its rigidity. The plant cells shrink when they lose water, losing their rigidness in the process.