The Sampler node gives visual feedback on the R,G and B values of an image that lay along a horizontal cross section of the image the position of which is determined by a little widget that appears in the viewer window. It is very useful to visualize the effects that color manipulations have upon the image.
Below: the Sampler node plotting the values along a horizontal cross-section (in red) of the image (inset). See how it displays a light mass interrupted by a dark mass in the middle.
Tip: if you place a Saturation node before it, set the saturation value to zero and then sample again. The RGB values will gang together into one curve that reflects the luminance of the image.