The magnetocrystalline anisotropy energy of a free-standing  Co monolayer has been calculated from first principles by means of the linear muffin-tin orbital method in the atomic-spheres approximation. The results are used to analyze those obtained previously for  Co/Pd2 and Co/Ag2 multilayers. Although the magnetization of both multilayers is predicted to be oriented perpendicular to the plane of the multilayers, the easy axis of the Co monolayer is predicted to lie in plane. These results can be understood in terms of the energy bands at the high-symmetry points of the Brillouin zone only. Co/Pd2 is found to have a perpendicular anisotropy because the Fermi energy is located much closer to states which have mainly Co dx2-y2 and dxy character than it does in the free-standing monolayer. These states are degenerate in the absence of spin-orbit coupling as a consequence of the threefold symmetry. The anisotropy energy is enhanced by the hybridizaton of the Pd d and Co d states and the large value of the Pd d spin-orbit coupling parameter. The smaller perpendicular magnetic anisotropy of a Co/Ag2 multilayer can be attributed to the increased band filling of the Co d band structure, as well as to a smaller hybridization between Ag and Co d states.