What happens when linear phase is critical?
Causal IIR (infinite impulse response) filters cannot have a linear phase response, so they can only be used if (exactly) linear phase is not required. Unlike IIR filters, FIR (finite impulse response) filters can have a linear phase response (and, consequently, a constant group delay). So in applications where a linear phase is required, we have to choose FIR filters.

A non-linear phase response causes signal dispersion because different frequency components experience a different delay when being filtered. E.g., in many audio applications a linear phase is not required (although in some it might be), whereas in digital communications, a non-linear phase would cause neighboring symbols to interfere with each other (inter-symbol interference, ISI), so a linear phase is important.

Note that it is possible to design IIR filters with an approximately linear phase in the pass band (as shown in this answer). For many practical applications this might be good enough, and it might save a lot of computational complexity and memory compared to a linear phase FIR filter with a comparable magnitude response.

As mentioned in MBaz's comment, more details on applications where a linear phase may or may not be required can be found in the answers to this question .