In decays of the Z0, the dominant mechanism for the direct production of charmonium states is the decay of the Z0 into a charm quark or antiquark followed by its fragmentation into the charmonium state. We calculate the fragmentation functions describing the splitting of charm quarks into S-wave charmonium states to leading order in the QCD coupling constant. Leading logarithms of M(Z)/m(c) are summed up using Altarelli-Parisi evolution equations. Our analytic result agrees with the complete leading order calculation of the rate for Z0 --> psiccBAR. We also use our fragmentation functions to calculate the production rate of heavy quarkonium states in W+/-, top quark, and Higgs boson decays.