Sun provided the energy, released in the form of ultraviolet radiations. Sunlight helped in photosynthesis. It also helped in the combination of C, H and N, while the later changes with the help of sunlight in the form of large molecules, such as nucleic acids, proteins and lipids.