Light hydrogen, protium (hydrogen-1, with nuclear mass near equal to neutron mass) is the best moderator of neutrons, and is used in the form of light water within light water moderated reactors. Unfortunately protium, which has a single proton without neutrons in its nucleus, has a rather large affinity for absorbing fast neutrons, capturing them within the nucleus, forming deuterium (hydrogen-2), and thus reducing the neutron flux.
But deuterium, with one neutron already within its nucleus, has a much lower affinity for neutron capture. Being the next lightest isotope but with twice the mass of protium, it is not as efficient at reducing the speed of neutrons as is protium. However, it has a low enough fast neutron capture cross sectional area relative to its elastic scattering cross sectional area to make it an ideal moderator. It is used in the form of heavy water. Unfortunately, on the rare occasions when it does absorb a neutron, the dangerously radioactive tritium (hydrogen-3) is formed.
Carbon, as graphite, also makes a good moderator, but being a solid it accumulates damage caused by the neutron collisions. In absorbing energy from the neutrons, the carbon atoms are displaced from their normal positions within the crystal lattice, increasing the internal energy of the graphite (Wigner energy). This internal energy was the cause of the Windscale fire in 1957.