Headphones are a part of a well-balanced monitoring environment. They offer a different listening perspective to the speakers in your room. Generally, headphones allow more detailed and focussed listening, which makes them ideal for spotting problems in recorded audio, such as background noise or interference. They’re also essential for recording acoustic instruments such as vocals, guitars or drums.
The drawback to using headphones is that the sound is generally drier and wider than when listening with speakers. Personally I find they can be misleading for judging dynamics too – the difference between levels seems to be smaller than when listening to speakers. These factors make it more difficult to use headphones for judging front-to-back depth.
What headphones are good at, however, is zooming in on audio. Headphones can be great for hearing details that you might otherwise miss with speakers – such as rumble, hiss, crackles, breaths, background noise, distortion etc. Headphones can be excellent for surgical correction and cleaning up. They can also be useful for judging subtle distortion when using limiters and saturation to reduce headroom in mastering.
If you choose well, you can use your headphones to compensate for weaknesses in your speakers – either using bright headphones alongside muddy speakers or deep headphones alongside thin speakers.