Dark matter and dark energy are both needed to reconcile the geometry of space with the total amount of observed matter that exists. They explain both the large-scale structure of the universe and its expansion.
So, how do we know that it is out there? Well, we have evidence for dark matter because we can observe the way that it interacts gravitationally with visible matter and electromagnetic radiation. And we have some evidence of dark energy because of what we see in the accelerated expansion of the universe.
To get a little more technical, the observations of the cosmic microwave background radiation (as observed by the Planck satellite and Wilkenson Microwave Anisotropy Probe) indicate that the universe is geometrically flat, or pretty close to it. If the universe is geometrically flat, like the observations and distributions suggest, critical density of energy and matter should equal 100%. However, our observations indicate that, in reality, this only adds up just about 30%.
This is a bit of a problem, which is where dark matter and dark energy come in to ‘fill in the gaps’.
But what are dark matter and dark energy? Dark matter is, simply, matter that does not emit or absorb electromagnetic radiation (light). And, it is believed that the vacuum energy density of empty space is the overriding factor in the process that governs dark energy.