Question: Beans and coal both have stored energy. Where did the energy come from that is stored in beans and coal?

What is the correct answer to the question from the following choices?
Options are: [i] From the Earth's gravity; [ii] From the Sun's light; [iii] From the heat in the Earth's core; [iv] From the air's carbon dioxide;
[ii]