Energy balance in living organisms can be studied on all levels of life: viruses, cells, multicellular organisms, and whole ecological communities. There are two key elements in applying the thermodynamic thinking to live organisms, associated with the first and second laws of thermodynamics:
Energy conservation (1st law of thermodynamics)
The organisms can be compared to heat engines that take energy from an environment, use it to do some useful work, and reject the unused energy back to the environment. E.g., plants absorb solar energy in the process of photosynthesis. The synthesized molecules are then split in a long chain of metabolic reactions to fuel processes, such as plant growth, ectraction of elements necessary from growth from soil, etc. the unused energy is rejected into the environment, e.g., in the form of CO$_2$. Animals typically consume already structured energy by consuming plants or other animals and digesting them - i.e., again processing the consumed molecules via a long chain of metabolic reactions. The useful work done by an animal is its growth, replication and physical movements, whereas the unused energy is rejected in the form of CO$_2$ and H$_2$O via perspiration, breathing, urination, etc. After death the energy still stored in the organism body, e.g., in the form of fat, will be consumed by other organisms - such as bacteria and worms, which will process it to the final unstructured form.
Entropy (2nd law of thermodynamics)
What might have already become clear from the discussion above is that not all energy can be used to do work - some of it is necessarily rejected, as required by the second law of thermodynamics. This increases the overall entropy of the universe. What has been regarded as a bit of a "paradox" is that the entropy of the organisms themselves is actually not increasing or even dicreasing as they are being created and grow. Of course, there is no paradox, since the decrease of entropy (increase of negentropy) in an organism is compensated by the overall increase of entropy in the environment. However, the exact details of formation of such dissipative structures are still not clear, and have been a subject of a debate. I suggest below some literature for reading.
References
- Thermodynamics in Ecology—An Introductory Review discusses application of the thermodynamic laws to ecological communities.
- What is life? by Erwin Schrödinger is where the concept of negentropy was first introduced
- Modern Thermodynamics: From Heat Engines to Dissipative Structures Prigogine and co-workers have pioneered the subject of dissipative structures and publushed multiple articles and books.
- Broken symmetry, emergent properties, dissipative structures, life: are they related? is a critique of Prigogine by Phil Anderson
- The Origins of Order: Self-Organization and Selection in Evolution by Stuart Kauffman
Update
To add a few references about the role of energy and entropy in life, as given in this answer to a question in the biology forum:
- Life and production of entropy
- Life as a manifestation of the second law of thermodynamics
- Life, hierarchy and the thermodynamic machinery of planet Earth