All the energy we have is indirectly coming from Sun.
(Solar Energy -> Plants -> Animals/Humans).
The energy generated from food in our body is chemical energy called Adenosine triphosphate (ATP).
I met employees of one startup company in New York that has filed a patent to directly convert Solar Energy to ATP. The technology is in very early stages and would be used as an alternative energy.
An extreme extrapolation of this technology would be that we may not need to eat food in future.