Life on Earth doesn't continue just because the Sun provides energy. What the Sun provides as well is something vital for life on the surface of our world - low entropy. What this means is that the Sun provides energy in a highly ordered form - it's directional and it's limited to certain wavelengths. Life uses the order in this energy source to build itself and keep itself going, all the while releasing energy as random heat. Although life is very ordered - low entropy - life can continue because life is a source of disorder - high entropy as a result of life actually living.
So, having established that the Sun is a vital source of ordered energy, where did this order, this low entropy, come from? It had to come from somewhere, because the universe shortly after the Big Bang consisted of widely and evenly spread out gas. The answer is that the order in the Sun came from gravity. Gravity is a long-range cumulative force, and gravity magnified differences in the gas: where there was slightly more gas even more would be pulled together. This concentration of matter produced galaxies and stars.
However, gravity doesn't produce order from nothing. Collapsing gas generates heat, and so the Second Law of Thermodynamics still applies - overall, the entropy of the universe increased - it's just that with gravity very localised spots with much lower entropy could form - stars and planets.
The source of life's complexity, the reason why life can appear and grow and evolve isn't anything strange or mysterious - it's the same force that fires up the nuclear furnaces at the heart of stars.