String theory is arguably, among best candidates for a Theory of Everything. So, because every TOE is an attempt to bind together the big and very small effects and things, a TOE must be able to describe everything observed, Am I right? Then, How does string theory explain expansion of space and dark energy?
On the other hand, string theorists have so far not rigorously constructed a single 4D de Sitter stable vacuum with $\Lambda>0$ in string theory . A de Sitter swampland conjecture  suggests that they don't exist. See e.g. Ref. 3 for a popular review.
It has among other things been suggested that we instead live in a meta-stable universe, or a universe with quintessence.
U.H. Danielsson & T. Van Riet, What if string theory has no de Sitter vacua?, arXiv:1804.01120.
G. Obied, H. Ooguri, L. Spodyneiko & C. Vafa, De Sitter Space and the Swampland, arXiv:1806.08362.
N. Wolchover, Dark Energy May Be Incompatible With String Theory, Quantamagazine, august 2018.
At the level of the formalism, you don't need string theory to accomodate dark energy. Standard quantum field theory is perfectly able to have a cosmological constant simply by having a constant term in the Lagrangian density. In the absense of gravity, however, this energy is not measureable and we usually arbitrarily set this constant to zero. Since string theory reduces to quantum field theory in a low-energy limit, it therefore also can generate cosmological constants.
More specifically, a cosmological constant appears when the value of the potential of a field at the vacuum expectation value (VEV) of a field is non-zero, and there is nothing that intrinsically prohibits string theory from having models in which the effective QFT has such potentials/VEVs. However, a positive cosmological constant needs supersymmetry breaking, since unbroken supersymmetry forces the value of the potential at the VEV to be less than or equal to zero, and the landscape of non-supersymmetric compactification is still poorly understood (though perhaps not quite as poorly as it was), even almost 20 years after Witten wrote about it in "The Cosmological Constant From The Viewpoint Of String Theory".
So, in principle, string theory has no issues with a cosmological constant, since already QFT has no issues with it and is a limit of string theory. But, in practice, model building to get specific values for the constant is rather hard.
The title of the question asks about dark energy, but the body of the question asks about the expansion of space in string theory.
The simplest answer I can give you is that the states of the string include a "massless spin-2" excitation, that "Weinberg's low-energy theorem" implies that any massless spin-2 object behaves like a graviton, and so the expansion of space in string theory works just as it does in Einstein's theory of gravity (general relativity).
General relativity is a field theory in which space itself becomes dynamical. In e.g. Cartesian coordinates, distances and angles between points are simply a function of what the coordinates are, but in dynamical geometry, there is a matrix-valued function called the metric which is also part of the formula for distances and angles. In general relativity, the metric is a physical field with its own equations of motion, and "expansion of space" means the metric is evolving so as to increase the distance between points. Given the equations, there are various conditions under which expansion happens and keeps happening, and apparently our universe satisfies one of those conditions: space is filled with a pressureless "dust" in which the "dust particles" are the galaxies.
That is the pre-quantum description of gravity. The quantum field theory of gravity describes the deviations of the space-time metric from flatness as due to a quantum field with massless spin-2 bosons that interact with all forms of energy. Those are the gravitons, and the theorem from Weinberg that I mentioned says that any such object behaves like a graviton.
The strings of string theory have many possible states. Among these are the states distinguished by how they are rotating and vibrating. The interactions of the strings consist of contributions from all these possible states. Most of these states are very heavy and have a high amount of angular momentum, but there are a few light states. Among these is the massless spin-2 state of the string, it behaves like a graviton by the theorem, and so strings interact via gravity along with other forces.
What I have verbally sketched here is the explanation for expanding space in string theory, that consists of emphasizing where the graviton in string theory comes from, and then saying "and it behaves just like the graviton in field theory". However, there are other perspectives on string theory. There is the "worldsheet" perspective, in which the string is regarded as fundamental and the coordinates of space-time are represented by fields on the string; and there is the perspective of "string field theory". Both of these should have an account of gravity, and of the expansion of the universe, that does not just pass the buck to field theory.
With respect to the worldsheet perspective, I can only quote a paper from 1989 which says that expansion of space (at least in one form) corresponds to "putting an (imaginary) charge at infinity for the time coordinate". And I can't offer anything at all from the perspective of string field theory. But I just mention that these other perspectives must exist, and in the long run they may offer a genuinely new explanation for the expansion of the universe.