According to Einstein’s theory of General Relativity (GR), anything with energy participates in gravitation. This means that light rays are gravitationally attracted to massive objects. Therefore the images we see of distant galaxies have been distorted by the gravitational field of other massive objects lying along the line of sight.
Let’s say we have a clump of dark matter with some gravitational potential, which distorts light rays . Then galaxy images in the background become distorted in a way that (according to GR) is directly related to that gravitational potential. We can measure the “shearing” (or stretching) distortion of the image in a given region of the sky by averaging over a patch of galaxies and looking for a preferred alignment. In the absence of any image distortion, we expect the galaxy images to be randomly oriented. However, gravitational lensing will stretch the image in a direction that depends on where matter is along the line of sight. This sort of lensing is called “weak” because the image distortions are small perturbations to the original galaxy shapes.
The most direct application of this technique is to produce mass maps of the large-scale distribution of matter in the Universe. These maps tell us about dark matter as well, since the lensing shear traces all forms of matter that contribute to the gravitational potential. The map shown here is from Massey et al. (2007), and shows how the total matter distribution (contours) correlates well with the visible-only matter distribution, seen as the colors — blue is the stellar mass density, yellow is the galaxy number density, and red is the X-ray brightness.
This method is a powerful way to constrain the properties of the Universe, since the weak lensing image distortions depend on both how cosmic structures form and the overall expansion history. Thus these observations are sensitive to the nature of dark matter, dark energy, and gravitational physics itself.
The statistics of the weak lensing shear field are most straightforwardly encoded in the two-point correlation function. This has been measured (e.g. Shrabback et al. 2010), but initial results are still somewhat crude because we currently do not have the wide-field optical data set required to get good statistics. However, we can predict weak lensing observables for future large-area missions such as Euclid using existing data on the expansion rate of the Universe and the cosmic microwave background. The predictions below, for both ground- and space-based survey configurations, were computed based for the standard class of cosmological models which includes GR, cold dark matter, and a cosmological constant. Posterior distributions for the model parameters were computed using a Fortran Markov Chain Monte-Carlo sampler and the current state-of-the-art expansion history data plus the WMAP 7-year cosmic microwave background data.

Predictions for the shear two-point correlation function, showing the 68% and 95% confidence-level regions for both space-based (grey hatched) and ground-based (blue solid) source redshift distributions. Also shown are the data points from Schrabback et al. 2010 (black points) and Benjamin et al. 2007 (magenta points) with 1 sigma error bars.
Vanderveld, Mortonson, Hu, and Eifler (2012) and Vanderveld and Hu (2013). Published in Physical Review D.