Energy replenishes automatically with some time.
You can also get more energy as a reward for completing quests, daily tasks, after level up and by exchanging some collections.  
Also, it is possible to buy some energy drinks using your sunrunes. For doing that, you need to press on the energy bar on your game screen.
 
Please be aware that your capacity in the energy bar and in the Townhall depends on the number of characters settled in different dwellings. Different dwellings can add a different number of coins and energy.
  
With love,
Your Farland Team