Energy is a relative term in image processing. The aim behind the term 'Energy' is a minimization problem or maximization one, it depends on your goal. It is used in typical object detection or segmentation tasks where it is posed as an Energy minimization problem.
One can define energy as a function that would capture the solution we desire and perform gradient-descent to compute its lowest value, resulting in a solution for the image segmentation.
In general, the word Energy is used in Optimization, as a synonym for "A measure of Error" or Loss or "distance from the ideal model ".