"Energy is conserved" is a "lie to children". What I mean is that it is a statement that is close to true that we are told to keep things simply. Like all lies to children it is not complete. The full statement is "Energy is conserved in flat, unchanging spacetime". From a mathematical point of view, energy is conserved only in systems with time-translational invariance. This just means that if the structure of your universe (as opposed to the things in it) doesn't change in time then the total energy won't either.
Unfortunately, our universe does change in time. When you have changing space metric it is very difficult to even talk about "Total Energy". The normal approach is to have some measurement of energy density at each point and then integrate over the volume to get the total. So you have a box with stuff in it and you can add it up to get a total.
What happens when the box changes?
Well the most obvious contribution to energy is the easiest; mass. If we have our box with some mass in it, when we double the size of the box then the mass density halves but the total mass stays the same. So mass is conserved.
The next most obvious form of energy is light. Light is our first problem, if we have a box with photons in it then we increase the size of the box the photons become stretched out, redshifted. Their energy decreases. So the total energy afterwards is lower. This is particularly fascinating to me, in the early time after the big bang, the universe was massively radiation dominated and was also expanding far FAR FAR faster than it does now. This means that the total energy of the universe was decreasing rapidly during this time. Would have reduced by many many many orders of magnitude.
Gravitational potential energy is even more tricky. If we have two stars in our box and we increase the distance between them by stretching the box then they are further apart but have retained their kinetic energy. So we have more energy this time. (This one is more tricky as the expansion of space itself is affected by gravity).
All of this is just with an expanding universe! Accelerating expansion is even worse. /u/pundaren already mentions Vacuum energy. What we think Dark energy is is a constant negative pressure in all space. What is important about it is that it doesn't get diluted meaning it's density is constant. This means when we double the volume of our box and keep the density constant we get double the amount (of negative pressure).
Since our universe is currently dominated by dark energy this term also dominates, that means that over time the total energy in our universe is increasing.
So we have various forms of energy and all of their densities respond differently when we expand our universe, some of these change the integrated energy. This isn't a problem because we know that Energy is only conserved when a system is invariant with a translation in time and our universe is not, so we don't need to be surprised when our law doesn't hold for an evolving universe.Source