This week, I found that the battery life of my Moto G (2nd Gen) was suddenly deteriorating. It used to last 1-2 days before. Now it was running out of juice in a mere 8 hours!
Checking which apps were consuming battery did not help, since the apps shown there and their percentage consumption all looked normal. It was just that the battery was draining too fast.
Turns out that if you suddenly face a diminished battery life, then it is a software problem. This can be caused by one of these:
You updated Android to a new version.
Some Google apps updated through Play Store.
You disabled some Google apps.
I had indeed disabled some Google apps which I felt unnecessary. These core apps might be necessary for optimum Android performance.
One of the solutions to this problem is to clear the cache of all apps. This did not work for me. The other suggestion is to do a factory reset. This is a huge hassle, but it worked and battery life is back to normal now.