We read in the Shema, "you shall write them on the doorposts of your house" (Deuteronomy 6:9). This refers to a mezuzah, the rolled-up scroll of parchment on which are written the first two paragraphs of the Shema. The Gemara raised the possibility that the mitzvah requires actually writing the mezuzah on the stones of the house itself (Menachot 34a): it then proceeds to prove that a mezuzah should be written on parchment.
The same text of the Shema tells us about tefillin that "you shall bind them on your arms" but is silent on the writing of the tefillin which needs to take place first. This difference has led some to conclude that part of the mitzvah of mezuzah is indeed to write it.
Maimonides was clear that the mitzvah of mezuzah is to place it on the door, not to write it, but the Shulchan Aruch implies that there is a mitzvah to write it as well.The difference this makes is that, according to the latter opinion, if you are capable of writing your own mezuzot, you probably should.