Living things build order. Order has more information than disorder and represents a local relative decrease in entropy. In order to do this, according to modern theormodynamics, organisms have to input not just any energy, but FREE energy. This is energy that contains less entropy than the average energy in the environment, and that implies that there has to be some kind of entropy gradient in the environment that the life forms can exploit. For surface life on Earth the primary gradient is supplied by the entropy difference between sunshine (lower entropy) and earth's reradiation in the infra-red (higher entropy). Photosynthesis exploits this, and the rest of surface life exploits the photosynthesis, directly or indirectly.
For the other terrestial life regime, undersea vents, the gradient is supplied by the temperature gradient between the magma of the vents and the cold ocean water nearby.