Sifrei Torah, tefillin and mezuzot
The Talmud, in Gittin 45b, says:
דתני רב המנונא בריה דרבא מפשרוניא: ס”ת, תפלין ומזוזות שכתבן (מין) ומסור, עובד כוכבים ועבד, אשה וקטן, וכותי וישראל מומר – פסולין, שנאמר: [דברים י”א] וקשרתם… וכתבתם, כל שישנו בקשירה ישנו בכתיבה, וכל שאינו בקשירה אינו בכתיבה;
Rav Hamnuna the son of Rava from Pashronia taught: sifrei Torah, tefillin and mezuzot written by (some editions: a heretic,) an informer, a non-Jew or a slave, a woman or a child, a Cuthean [a particular group who were converted under duress and were therefore suspected of not being entirely punctilious in their Jewish observance] or an apostate Jew, are invalid, as it is said, [Deut 6:8-9] ‘Bind them…write them’ – anyone who is commanded to bind is commanded to write, and anyone who is not commanded to bind is not commanded to write.
That is, if someone has an obligation to lay tefillin, they are considered valid to write tefillin. While this may not seem strictly logical, it is absolutely unchallenged in rabbinic literature, and as such is incontrovertible. There is also a category of people who do have an obligation to lay tefillin but nonetheless may not write; they are broadly analogous to people who may not be your proxy to vote because they have been convicted of election fraud. Henceforth we assume our discussion is limited to Jews who are “in good standing” – ones who observe the mitzvot and have not rejected the validity of the halakhic system.
Women, as a class in rabbinic literature, are not obligated to lay tefillin, for a number of reasons which we shall not address here. It follows, from the Talmud citation and discussion of the nature of proxies above, that they are not considered valid to write tefillin, and likewise neither are they valid to write mezuzot or sifrei Torah.
This last step, that of automatically associating tefillin with mezuzot and sifrei Torah, is explained in more detail in a separate page. As is, it may seem somewhat tenuous, but it has gone largely unchallenged in the early literature, and as such has considerable power of precedent. How it is made is questioned, but its conclusion is accepted by virtually all authorities. Indeed, its conclusion is crucial to many of the laws of sofrut, since laws tend to be derived from reference to one of the three elements and extended by this association to the other two. If they weren’t generally associated, we would have three separate sets of laws. Associating the laws of tefillin very closely with the laws of sifrei Torah and mezuzot is not a principle we can disregard.