  We realize a scanning probe microscope using single trapped $^{87}$Rb atoms
to measure optical fields with subwavelength spatial resolution. Our microscope
operates by detecting fluorescence from a single atom driven by near-resonant
light and determining the ac Stark shift of an atomic transition from other
local optical fields via the change in the fluorescence rate. We benchmark the
microscope by measuring two standing-wave Gaussian modes of a Fabry-P\'{e}rot
resonator with optical wavelengths of 1560 nm and 781 nm. We attain a spatial
resolution of 300 nm, which is superresolving compared to the limit set by the
780 nm wavelength of the detected light. Sensitivity to short length scale
features is enhanced by adapting the sensor to characterize an optical field
via the force it exerts on the atom.
