Halachah · Shulchan Aruch

Shulchan Arukh, Orach Chayim 38/שולחן ערוך·אורח חיים ל״ח

אמי הם חייבין בתפילין והפטורים. ובו יג סעיפים:
חולה מעיים פטור מתפילין: הגה אפילו אין לו צער אבל שאר חולה אם מצטער בחליו ואין דעתו מיושב עליו פטור ואם לאו חייב. [מרדכי וא"ח ומיי' פ"ד]:
1One who is ill in his intestines is dispensed from the [commandment to wear] tefillin. Rema: "Even if he is not in pain. However [regarding] all other sick people, if he is in pain due to his illness and his mind is not at ease, he is also dispensed [from the commandment]. Otherwise he is obligated."
במי שברי לו שאינו יכול להתפלל בלא הפחה מוטב שיעבור זמן התפל' ממה שיתפלל בלא גוף נקי [וע"ל סי' פ'] ואם יראה לו שיוכל להעמיד עצמו בגוף נקי בשעת ק"ש יניח תפילין בין אהבה לקריאת שמע ויברך:
2One to whom it is clear that he cannot pray without flatulating, it is better that the time for Tefilah (the Shemoneh Esreh) should pass rather than that he should pray without a clean body. (And see further section 80.) And if it appears to him that he will be able to control himself to have a clean body [i.e. not flatulate] at the time of reading the Shema, he should put on tefillin between [the blessing just prior to Shema, ending in] Beahava and Shema, and bless [upon the tefillin].
גנשים ועבדים פטורים מתפילין מפני שהוא מצות עשה שהזמן גרמא: הגה ואם הנשים רוצים להחמיר על עצמן מוחין בידם [כל בו]:
3Women and slaves are exempt from Tefillin because it is a positive commandment which is caused by time. Rema: And if the women want to be stringent for themselves, we protest against it (Kol Bo).
דהמניח תפילין צריך ליזהר מהרהור תאות אשה: הגה ואם א"א לו בלא הרהורים מוטב שלא להניחם: [כל בו וא"ח]:
4One who wears tefillin must be cautious to avoid thoughts about desire for a woman. Rema: And if it's impossible for him not to think [about this desire] it is better not to put on tefillin.
האבל ביום ראשון אסור להניח תפילין מכאן ואילך חייב אפי' באו פנים חדשו':
5A mourner in the first day [of the seven days of mourning] is prohibited from wearing tefillin. From here [the second day] onwards he is obligated, even if "new faces" came (ie. people that came to comfort him who hadn't been there before).
ובט' באב חייבין בתפילין (וע"ל סי' תקנ"ה):
6On the ninth of Av we are obligated in tefillin. (See further section 555.)
זחתן ושושביניו (פירוש רעיו השמחים עמו) וכל בני חופה פטורין משום דשכיח שכרות וקלות ראש:
7A groom and his guests (meaning his friends and those rejoicing with him) and all the participants in the Chupah are dispensed [from tefillin] given that we commonly find [in such situations] drunkenness and levity.
חכותבי תפילין ומזוזות הם ותגריהם ותגרי תגריהם וכל העוסקים במלאכת שמים פטורין מהנחת תפילין כל היום זולת בשעת ק"ש ותפלה: הגה ואם היו צריכים לעשות מלאכתן בשעת ק"ש ותפלה אז פטורין מק"ש ומתפלה ומתפילין דכל העוסק במצוה פטור ממצוה אחרת אם צריך לטרוח אחר האחרת אבל אם יכול לעשות שתיהן כאחת בלא טורח יעשה שתיהן (הגהות אשירי בשם א"ז ור"ן פ' הישן):
8Scribes writing tefillin and mezuzot, them, their distributors and their distributors' distributors, and all those involved in the work of Heaven, are dispensed from wearing tefillin all day long, except [that they must wear them] at the time of reading Shema and [of] the Tefilah (Shemoneh Esreh). Rema: And if they had to do their work at the time of reading Shema and of the Tefilah, they are dispensed of Shema and Tefilah and tefillin, for everyone who is involved in a mitzvah is dispensed from engaging in another mitzvah if one has to make an effort for the other mitzvah. However if he can do both mitzvot without exerting himself, he should do both. (Quoted from Hagahot Ashrey in the name of Or Zarua and RaN on the Talmudic Chapter "The Sleeper.")
טמצטער ומי שאין דעתו מיושבת עליו ונכונה פטור מפני שאסור להסיח דעתו מהם:
9On who is distressed, and one who's mind is not settled and ready is exempt [from תפילין] since it is forbidden to take one's mind off of them.
יהקורא בתורה פטור מהנחת תפילין כל היום זולת בשעת ק"ש ותפלה:
10One who reads from the Torah (ie. he is in the middle of learning Torah) is exempt from wearing תפילין the entire day, except for when he is saying Shema and Tefillah (ie. Shmonah Esrei).
יאלא יחלוץ תפילין בפני רבו אלא יפנה לצד אחר מפני אימתו ויחלוץ שלא בפניו:
11One should not remove his תפילין in front of his rabbi, rather he should face a different direction because [he should display] fear/reverence [before him]... and [then] remove them [while] not facing him.
יבהיה צריך לתפילין ומזוזה ואין ידו משגת לקנות שניהם תפילין קודמים:
12If one needed תפילין and a מזוזה, and he could not afford to buy both, the תפילין takes precedence.
יגמנודה ומצורע אסורים להניח תפילין:
13A person who was excommunicated and a leper are forbidden to wear תפילין.