The necessary molecules for the basic ‘building blocks' of life – ie molecules – can be made by the action of charged particles and UV light, especially at the boundaries of denser and less dense atmospheric layers; during electrical discharge (ie lightning strikes) in the primordial planetary atmosphere; at the hydrothermal vents after the formation of earth's crust; on the shores of primordial seas and oceans when the tides were huge and more frequent and in the small puddles of water at the foot hills of volcanoes due to gas from the magma being percolated through the water. However, these places are insignificant compared to the vastness of space where molecules were being formed via the processes of astrochemistry.
It is believed that some of the necessary organic molecules may have been formed in specific areas of space (namely dark molecular clouds, eg Horsehead nebula) and delivered on to the Earth during the heavy bombardment period of its history, approximately 4.3-4.0 billion years ago. These organic molecules may have played a pivotal role in the formation of life on Earth. In addition, it is believed that life on Earth was formed within a very short geological time frame of only 200-300 million years. So, it is not unreasonable to suppose that these molecules were initially made in space which in effect could be, metaphorically speaking, a huge chemical laboratory.
To date no less than 190 molecules have been discovered in dark molecular clouds; the formation of molecules under a variety of simulated space conditions (eg different temperatures, levels of radiation energies and different types of impinging radiations) compares well with what is found in these huge structures. Such molecules are then eventually delivered on the surface of a planet by impactors. Collectively, the molecules made in the vastness of space and those other places mentioned at the beginning of this abstract form the inventory of molecules from which life on Earth emerged.