Though this question is naturally of great importance for nursing women who wish to attend synagogue or who otherwise want to feel free to go out, classic halachic discussions of women’s activities in the public or sacred sphere do not single out nursing as a halachic issue. Still, there are some halachic and communal considerations to take into account.
In public settings, out of concern for tzeniut, a woman should try to nurse discreetly, minimizing exposure.
In synagogue, one could argue that the sanctity of a space set aside for prayer calls for an added level of discretion, although nursing does foster the mother’s ability to pray there. (For more about nursing and praying, see here.) In some ways, the situation is analogous to giving a young child a snack or toy in synagogue to quiet them and foster a parent’s prayer, which is more widely embraced in some communities than in others. Nursing is more intimate, though, so determining what is appropriate in what context depends on real sensitivity to communal norms, as well as considerations of a woman’s own comfort — and that of her baby.
Regardless of what is acceptable and appropriate in a given synagogue, it is always appreciated when communities support nursing mothers by making nursing rooms available so that every nursing woman has that option.
There is some halachic discussion about men reciting Shema, berachot or prayers in the presence of a nursing woman if her breast is exposed. We can infer from this that if she nurses discreetly, there seems to be no limitation on what he can recite. Mishna Berura 75:3 rules that a man should not recite when there is exposure (though one might infer that in this case the man could simply close his eyes or turn away). Ben Ish Chai Shana Rishona Bo 10 concurs, but also cites a second view, which he says can be relied on as necessary:
Ben Ish Chai Shana Rishona Bo 10
“There are those who say that, since a woman normally uncovers her breasts while nursing, the breasts at that time are considered like the hands and the face, and only if she is not nursing, when she normally covers her breasts and is particular about this, then it is prohibited [for a man] to recite in her presence, and one can rely on this reasoning in a pressing situation.”
While this view still expresses preference for a man to limit his ritual performance in the presence of less discreet breastfeeding, it suggests that Halacha recognizes that the meaning of exposure in the context of breastfeeding differs from that of other contexts.