Energy is used in levels to construct towers and your defences.

You begin every level with energy and can earn more by killing Alien Creeps; different types of Creep reward varying amounts of Energy

You can also gain more energy by calling in waves early. Simply tap twice on the Wave Herald to call a wave in early.