Any colonist working as a carpenter can make hammers from lumber. This particular good cannot be transported as cargo, and therefore cannot be sold either.
A hammer in the Colonization games is the somewhat curiously-named output of a Carpenter's Shop or Lumber mill. It is used for constructing buildings, ships or artillery. A Master Carpenter initially produces twice as many hammers per turn as an ordinary colonist, but that ratio may change a little after bonuses are counted.