Your character will replenish one energy every 3 minutes naturally. You can also eat food, fruit, or drink juice to regenerate it immediately. Every time you level up, you will get a full energy bar refill.
If you plan to travel frequently and explore for new resources, having a stock of food to replenish your energy is necessary. Most locations have fruit trees and bushes you can forage if you need extra energy.
Increasing Max Energy
Your maximum allowed energy increases each time you increase a player level. This benefit will allow you to travel further distances between locations, and make more locations available to travel to.
Nearly all actions in the game, other than picking up Starium at your home or claiming presents, will require you to use energy. When clicking on the item you want to interact with, the action will be performed and a notification will show up telling you how much energy was used.
Here is a list of everything in the game that provides energy, the amount of coins you would get for selling it and the price you pay for 1 energy (to help decide whether it is better to use it for energy or to sell it).