not all organisms rely on the sun as the source of energy, but most of the photosynthetic organisms(eg: plants)use the energy from sun for the synthesis of the food. some organisms utilise the energy produced by the plants(such as grass eating herbivores).
hope u got my point.