Conservation of Energy vs Expansion of Space
Dark energy is a form energy that appears to have a constant density in space even as the universe expands. The simplest model for this is a cosmological constant in the gravitational field equations. This model agrees with observations. What dark energy really is or whether this model is correct is beside the point here. My answer assumes this hypothesis. The question we need to answer is how can we reconcile energy conservation with that model?
As the universe expands the amount of dark energy in an expanding volume increases in proportion to the volume. Meanwhile the amount of energy contained in cold matter remains constant. It sounds like dark energy is therefore being created out of nothing in violation of the law of energy conservation. In fact there is also a negative contribution of energy in the gravitational field due to the dynamic expansion of space itself. As the expansion of the universe accelerates due to dark energy the magnitude of this negative background gravitational energy increases. This matches all other forms of energy so that the total is constantly zero and energy is conserved.
The equation for energy in the standard cosmological models for an expanding universe including radiation and dark energy as well as ordinary matter can be derived from these formulations and is as follows:
$E = Mc^2 + \frac{\Gamma}{a} + \frac{\Lambda c^2}{\kappa}a^3 - \frac{3}{\kappa}\dot{a}^2a - Ka = 0$
$E$ is the total energy in an expanding region of volume $a(t)^3$. This always comes to zero in a perfectly homogeneous cosmology.
$a(t)$ is the universal expansion factor as a function of time normalised to 1 at the current epoch. It started as zero and increases with time as the universe gets bigger.
$\dot{a}$ is the derivative of $a$ with respect to time, in other words it is the rate of expansion of the universe.
$M$ is the total mass of matter in the region
$c$ is the speed of light
$\Gamma$ is the density of cosmic radiation normalised to the current epoch
$\Lambda$ is the cosmological constant also known as dark energy, thought to be positive.
$\kappa$ is the gravitational coupling constant. In terms of Newton's gravitational constant $G$ it is $\kappa = \frac{8\pi G}{c^2}$.
$K$ is a constant that is positive for spherical closed space, negative for hyperbolic space and zero for flat space.
This equation tells us that the positive energy in matter, radiation and dark energy is perfectly balanced by a negative quantity of energy in the gravitational field that depends on the rate of expansion of the universe. As the universe expands the length scale $a(t)$ increases. The amount of energy in ordinary matter $Mc^2$ is constant in an expanding volume. The radiation energy $\frac{\Gamma}{a}$ decreases due to cosmic redshift and the amount of dark energy $\frac{\Lambda c^2}{\kappa}a^3$ increases as the volume expands. The rate of expansion must adjust so that the negative gravitational energy balances the sum of these energies. In particular the dark energy must eventually become the dominant positive term and the expansion of space accelerates to balance the energy equation.
Some people claim incorrectly that energy is not conserved in an expanding universe because space-time is not static. The law of Energy conservation is derived from Noether's theorem when the dynamical equations are unchanged with time. These people confuse the invariance of the equations with the invariance of the solution. Space-time changes but the equations obeyed by the expanding universe do not change. Space-time cannot be treated as a background, its dynamics must be included when deriving the enrgy equations via Noether's theorem. This leads to the equations given above which show that energy is indeed conserved.
Conservation of energy relies on the symmetry of your system under time translation (see Noether Theorem). In a system that is not time translation invariant, eg expanding universe, energy doesn't have to be conserved.
The claim that energy conservation does not hold in GR is debatable, as any choice of time-like vectorfield will yield such a law via Noether's second theorem (energy conservation in GR was in fact the reason why Noether developed her theorems in the first place). However, these laws are (in Noether's terminology) 'improper', ie given through linear combinations of differential identities given by the 'Lagrangian expressions' and their derivatives (cf Invariant Variational Problems by Emmy Nother).
From the more practical perspective of physics, the issue with these laws is that they contain a delocalized contribution that cannot be associated with an energy density. A classical analogon would be energy conservation in accelerated frames of reference, with the caveat that in contrast to classical mechanics, in GR we cannot just go to an inertial frame to make all 'fictious' forces go away globally.
Now, for your case specifically (for convenience, I'll consider the spatially flat Friedmann model), it turns out that if we choose cosmic time as our parameter field, we'll end up with the first Friedmann equation
$$ \left(\frac {\dot a}a\right)^2 = H^2 = \frac{8\pi}{3} \rho + \frac 13 \Lambda $$
or more suggestively
$$ \rho + \frac 1{8\pi} \Lambda - \frac 3{8\pi} H^2 = 0 $$
with positive contributions by matter and dark energy balanced by a negative contribution that we identify with the gravitational field.
As an aside, we can also rewrite the second Friedmann equation
$$ \frac {\ddot a}a = \dot H + H^2 = -\frac{4\pi}3 (\rho + 3p) + \frac 13 \Lambda $$
in a way that, depending on your point of view, is either eye-opening or misleading.
Compute $\dot H$ by differentiating the first equation and insert it into the second one, substitute $H^2$ as well and you'll arrive at
$$ \dot\rho + 3H(\rho + p) = 0 $$
Now, consider a finite volume $V=(R_0a)^3$. As $H = \dot V / 3V$ multiplying by $V$ yields
$$ \dot\rho V + \rho\dot V + p\dot V = 0 $$
or with $U = \rho V$
$$ \mathrm dU + p \mathrm dV = 0 $$
Note the lack of explicit contributions by either dark energy or gravity, though they implicitly contribute dynamically.