In short, dark matter and dark energy are needed to reconcile the geometry of space with the total amount of observed matter that exists in space. They explain both the large scale structure of the universe and the observed 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. We know about 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 (made 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.
But what are dark matter and dark energy? Dark matter is simply matter that does not emit or absorb electromagnetic radiation (light). And is believed that the vacuum energy density of empty space is the overriding factor in the process governing dark energy.
This, however, is a very basic breakdown. You can get a more detailed discussion here, and see the video below for additional commentary (or if you are more of a visual learner).
Parts of this summary were borrowed from this article.