why solid is the least amount of energy?

The first thing to know is that temperature is the average kinetic energy of the particles. As you might already know, kinetic energy is the energy of motion. In a solid, the particles are generally rigid (not moving a lot). Since the particles do not move as much, it has lower kinetic energy than the liquid and gas states. So, usually, solids have the lowest energy.