We are fairly certain that life on planetary surfaces will not occur unless there is sufficient amounts of liquid water. Therefore, condensation of water vapor from the primordial atmosphere is crucial. The evolution of the early atmosphere of the earth is summarized below:

Evolution of Planetary Atmospheres depends on temperature:

There are hence two keys to the evolution of planetary atmospheres:

After condensation of water vapor produced the earth's oceans, thus sweeping out the carbon dioxide and locking it up into rocks, our atmosphere was mostly nitrogen. Currently, our atmosphere is 72% nitrogen and 28% oxygen (everything else like H2 and CO2 exists only in trace amounts). So where did the oxygen come from?

So now let's make some life over the next billion years or so. The first step is the chemical production of simple organic molecules known as Amino Acids)

These newly formed Amino Acids are now loosely mixed in the oceans

So now we have some amino acids (monomers) loosely mixed in the oceans. This Liquid medium is important because:

Next goal is to combine monomers into Polymers (peptide chains) such as the one shown below:

Now we Need to concentrate monomers together to facilitate polymer formation. If left as a dilute mixture in the early oceans, monomers will never form long chains of molecules because the concentration is too low.

Step 2: Concentrate the Monomers via some mechanism:

4 billion years ago the moon was substantially closer to the earth than it is now. Large lunar tides coupled with storms could have formed transient inland lakes. When that water is evaporated over a period of weeks/months then a rich mixture of monomers would settle into the clays that formed the lake bottom.

Clays Silicate Surfaces acts as a catalyst

Peptide chains of around 100 amino acids can be found today

Does the reaction on the silicate surfaces favor L amino acids?

Step 3: BIG, Unknown Next Step need to organize a system capable of self-replication (e.g. DNA)

EVOLTUIONARY ADVANTAGE: Polymers that could reproduce themselves will survive

Once a genetic code is discovered which allows cell reproduction, there is no need to further search for a perhaps more "efficient" genetic code since the ability to reproduce represents a quantum leap in the ability to survive.