RNA world hypothesis is generally accepted regarding formation of first cell and reproduction of cells.
It is possible that after Earth was formed there were chemical elements and compounds present in the Earths crust, oceans, in the atmosphere. In time due to the cosmic radiation (UV too) and sunlight there were many chemical reactions.
1. Simple reactions could have taken place to form organic compounds and resulting in a RNA molecule, with carbon, nitrogen, phosphorous, hydrogen, oxygen etc (forming nucleotides). This process could have happened in atmosphere.
2. The RNA molecules had evolved into chains and self-replicable chains.
3. Proteins were formed from elements and we joined with RNA. A cell membrane eventually formed around them. This process may have happened in the oceans or on land.