What allows them to breathe?
Which environment allows them to breathe?
In clauses (if that's what you're asking)...
The main rule of thumb (I think) for learners is: if unsure, use "which/who" rather than "that". It's not really the way it works, but this is a grammatical point that, like "shall" vs. "will" or "like" vs. "as" or split infinitives ultimately reduces itself to fine points that many native speakers ignore.
Both "which" and "that" usually introduce a subordinate clause that describes something. English, unlike, it seems, many other languages, makes a distinction between a description that narrows or "restricts", and one that does not.
This matter, which we discussed yesterday, is now closed.
Note the description does not restrict "this matter"; "this matter" is the only one in this context; the description merely adds another fact about it. Note the "which", and also the commas around the "non-restrictive" clause.
The matter that we discussed yesterday is now closed.
The matter we discussed yesterday is now closed.
Here there are many matters, but we are only concerned with the one we discussed yesterday. So the descriptive clause is "restrictive". Note the "that", and the lack of commas.
"That" is used (and can be omitted if it is the object of the verb in the subordinate clause, but not otherwise) if the clause is restrictive (and the commas must be omitted).
"Which" is used (and cannot be omitted) if the clause is not restrictive (and the commas are required).
For your examples:
Which mask allows them to breathe?
The mask that allows them to breathe is green. (Many masks, but they can only breathe through the green one).
What is the color of the mask you gave them yesterday? What else can you say about it?
The mask, which allows them to breathe, is green. (One mask, and, by the way, they can breathe through it.)
For people "which" is replaced by "who" or "whom".
Now, the commas are more important than the choice of "which" vs. "that". They cannot be omitted in a non-restrictive clause.
In practice, however, many native speakers use "which" or "who/whom", without commas, even in non-restrictive clauses. On the other hand, the use of "that" in a non-restrictive clause (with commas) has been an archaism for about 150-200 years.
So if in doubt, use "who" or "which".
Student or Learner