Molecules - "blocks of life" (nucleobases, amino acids, sugars, phosphates and other compounds) are produced as a result of chemical evolution in appropriate conditions in the various parts of the universe. These molecules are initial components in the synthesis of nucleic acids (DNA and RNA), proteins, biopolymers and other metabolites. Thermodynamic "principle of substance stability" is the driving force behind the selection of the most stable supramolecular structures in the presence of water. Thermodynamics provides a common life code in the universe. Thermodynamics directs the chemical and the prebiotic(transitional) evolution. And then begins the Darwin's evolution. It (as well as the prebiotic evolution) is governed by the laws of hierarchical thermodynamics and the principle of substance stability. Generalized Gibbs equation at quasi-approximation can be applied to all hierarchical levels of living matter.
Life arises and exists where there are the appropriate conditions of the environment and the cyclic exchange of matter and energy. However higher organisms, which have an improved system of metabolism and immune system, should eat primary forms of nascent life. Darwin understood this situation many years ago.
Int. J. Mol. Sci. 2006, 7, 98-110 http://www.mdpi.org/ijms/papers/i7030098.pdf