How could vacuum energy cause the expansion of the universe? Is it by gravity? How could gravity produce a repulsive force?
 A: Gravity can quite easily be repulsive due excessive negative pressure as mentioned by @Stan Liou. Let us work this out. We will need two equations - 


*

*Einstein's Equation
$$
R_{\mu\nu} = 8 \pi G \left( T_{\mu\nu} - \frac{1}{2} T g_{\mu\nu} \right)
$$
where $T = g^{\mu\nu} T_{\mu\nu}$. This equation describes how matter affects the curvature of space-time. In particular, we will use two forms of $T_{\mu\nu}$. One for a perfect fluid of density $\rho$ and isotropic pressure $p$
$$
T_{\mu\nu}^{fluid} = \left( \rho + p \right) U_\mu U_\nu + p g_{\mu\nu}
$$
where $U_\mu$ is the four velocity of the fluid itself. The other EM tensor that will be used is the one that contributes to a non-zero vacuum energy, or a cosmological constant, defined by
$$
T^{cm}_{\mu\nu} = - \rho_{vac} g_{\mu\nu}
$$

*Raychaudhari's equation
$$
\frac{d \theta}{d \tau} = 2 \omega^2 - 2 \sigma^2 - \frac{1}{3} \theta^3 - R_{\mu\nu} U^\mu U^\nu
$$
This equation is a purely geometric one. It is simply a statement about the behaviour of geodesics on a curved manifold. Here $\theta$ is the "expansion parameter" and its value describes the affect of gravity on a ball. $\theta>0$ implies that the ball grows and $\theta<0$ implies that it shrinks. Here $U^\mu$ denotes the 4-velocity of particles moving in the geodesic.
We can now work out the effect of gravity for the simplest possible situation. We consider a set of particles that are initial at rest w.r.t each other in a small region (so that we can approximate $g_{\mu\nu} = \eta_{\mu\nu}$) of spacetime (take this time to be $t=0$), i.e. $U^\mu = (1,0,0,0)$. At $t=0$, $\omega = \sigma = \theta = 0$ (these quantities are like the stress, shear and expansion. Since the particles in the ball are not moving at all, all of the above are zero). Thus, at this time, the Raychaudhuri's equation takes the form
$$
\frac{d\theta}{d\tau} = - R_{00}
$$
We can also treat (in an approximation) the set of particles as a perfect fluid, in which case
$$
T_{00} = \rho,~~ T = g^{\mu\nu} T_{\mu\nu} = -\rho + 3 p
$$
We can then use Einstein's equation to derive $R_{00}$ for the system. We then get
$$
\frac{d\theta}{d\tau} = - R_{00} = - 4 \pi G \left( \rho + 3 p \right)
$$
What we are really interested is the sign of $\frac{d \theta}{d \tau}$. Usually energy densities are positive. For any positive pressure, $\frac{d \theta}{d \tau} < 0$ and the ball shrinks (doing exactly what we expect of gravity). In fact, even for negative pressure with magnitude as big as $|p|_{max} = \frac{\rho}{3}$ gravity always attracts. However, for any negative pressure with larger magnitude, we find that gravity indeed becomes a repulsive force!
Great! Now, what does this mean about the relation to the vacuum energy? Note that $T_{\mu\nu}^{cm} = T_{\mu\nu}^{fluid} (p \to - \rho_{vac})$. We then find
$$
\frac{d\theta}{d\tau} = - R_{00} = 8 \pi G \rho_{vac}
$$
We then find that any positive energy density will cause gravity to act repulsively! The usual example of a spacetime with positive energy density is de Sitter space.
Note, however that the vacuum energy explanation of the expansion of the universe gives us a theoretical value $\rho_{vac} \sim 10^{112} erg/cm^3$. The measured value is $10^{-8} erg/cm^3$ thereby giving us a discrepancy of $10^{120}$. One might argue that our theoretical argument is flawed, but that would require some special symmetry that one does not see in spacetime. This is one of the biggest open problems in theoretical physics today and is called the "Cosmological constant problem"
