the sun is used for providing energy to plants