Here’s a detailed article on how to run an ESP8266 for a long time on a battery by Marco Schwartz:
For most of the projects I am building with the ESP8266 WiFi chip, I usually don’t care too much about the power consumption aspect. I for example build data loggers that are constantly connected to the mains electricity, and appliances controller which also have an easy access to power. However, in some cases, we want to build projects that are only powered by batteries. This is for example the case for a motion sensor that you will install in your home, or a data logger you would put in a remote location.
More info at Open Home Automation.
Read more Here