Surprisingly, Energy is not consumed with each attack you make in Avengers Alliance. Instead, Stamina functions for this, while Energy dictates how many battles you can physically enter. For example, to take part in one battle, you will normally need 10 Energy. Energy refills after a set period of time, and this is to stop people from 'spamming' easy battles to level up and get new equipment.
How to get More Energy:
If you are struggling to get enough Energy to keep all your battles going, you should try requesting it as a gift from friends. With regular supplies of Energy coming in, you shouldn't have any issues keeping things flowing. You can also buy Energy with Gold, though this should be a last resort. Note that your Energy does not automatically refill from sources such as gifts. Instead, click on the 'Use' option next to the Energy indicator. It will then list all of the refills that you have available (if any).