A consequence of the Strong Equivalence Principle (SEP) is that a photon in a gravitational field moves as if it possessed mass, and light rays therefore bend around gravitating masses. Thus celestial bodies can serve as gravitational lenses probing the gravitational field, whether baryonic or dark without distinction.
Since photons are neither emitted nor absorbed in the process of gravitational light deflection, the surface brightness of lensed sources remains unchanged. Changing the size of the cross-section of a light bundle only changes the flux observed from a source and magnifies it at fixed surface-brightness level. If the mass of the lensing object is very small, one will merely observe a magnification of the brightness of the lensed object an effect called microlensing. Microlensing of distant quasars by compact lensing objects (stars, planets) has also been observed and used for estimating the mass distribution of the lens–quasar systems.
In Strong Lensing the photons move along geodesics in a strong gravitational potential which distorts space as well as time, causing larger deflection angles and requiring the full theory of General Relativity. The images in the observer plane can then become quite complicated because there may be more than one null geodesic connecting source and observer; it may not even be possible to find a unique mapping onto the source plane cf Fig.6. Strong lensing is a tool for testing the distribution of mass in the lens rather than purely a tool for testing General Relativity. An illustration is seen in Fig. 7 where the lens is an elliptical galaxy .
Figure 6. Wave fronts and light rays in the presence of a cluster perturbation. From N. Straumann .
At cosmological distances one may observe lensing by composed objects such as galaxy groups which are ensembles of “point-like”, individual galaxies. Lensing effects are very model-dependent, so to learn the true magnification effect one needs very detailed information on the structure of the lens.
Figure 7. This image resulted from color-subtraction of a lensing singular isothermal elliptical galaxy. The strongly lensed object forms two prominent arcs A, B and a less extended third image C. From R.J. Smith & al. 
Weak Lensing refers to deflection through a small angle when the light ray can be treated as a straight line (Fig. 6), and the deflection as if it occurred discontinuously at the point of closest approach (the thin-lens approximation in optics). One then only invokes SEP to account for the distortion of clock rates.
The large-scale distribution of matter in the Universe is inhomogeneous in every direction, so one can expect that everything we observe is displaced and distorted by weak lensing. Since the tidal gravitational field and the deflection angles depend neither on the nature of the matter nor on its physical state, light deflection probes the total projected mass distribution. Lensing in infrared light offers an additional advantage of being able to sense distant background galaxies, since their number density is higher than in the optical range.
Background galaxies would be ideal tracers of distortions if they were intrinsically circular, because lensing transforms circular sources into ellipses. Any measured ellipticity would then directly reflect the action of the gravitational tidal field of the interposed lensing matter, and the statistical properties of the distortions would reflect the properties of the matter distribution. But many galaxies are actually intrinsically elliptical, and the ellipses are randomly oriented. This introduces noise into the inference of the tidal field from observed ellipticities. A useful feature in the sky is a fine-grained pattern of faint and distant blue galaxies appearing as a ‘wall paper'. This makes statistical weak-lensing studies possible, because it allows the detection of the coherent distortions imprinted by gravitational lensing on the images of the galaxy population.
Thus weak lensing has become an important technique to map non-luminous matter. A reconstruction of one of the largest and most detailed weak lensing surveys undertaken with the Hubble Space Telescope is shown in Fig. 8 . This map covers a large enough area to see extended filamentary structures.
Figure 8. Map of the dark matter distribution in the 2-square degree COSMOS field: the linear blue scale on top shows the gravitational lensing magnification κ, which is proportional to the projected mass along the line of sight. From R. Massey & al. 
A very large review on lensing by R. Massey & al.  can be recommended. We show several examples of lensing by clusters in Sec. 15.