The sun constantly releases energy at the enormous power of 3.827*10^14 Terawatts.
You could think that the quantity of energy reaching the earth is rather small, but it's only small in comparison to the entire amount of energy produced by the sun. As the sun produces energy at a fairly high level You confidently may believe that earth receives enough energy from the sun to satisfy its needs.
One problem is to convert the energy received from the sun in form of rays into means of power usable for tasks we need it, i.e. e.g. electricity, heat or mechanical energy.
Whilst mechanical energy can't be gained directly, electricity and heat can both be
gained directly from the rays of the sun, the former with solar cells (photovoltaics),
the latter with either solar towers, solar troughs or solar dishes. These technologies
still are under development, so improvement in efficiency is to be expected (and
necessary in order to rule out conventional means of energy).