Alot of junk being said in this thread. No studio worth the money you pay for good mastering will EVER master on headphones. Headphones distort signal because of their size, proximity to the ears, and division of stereo width. There is no genre of music specifically meant to be played in headphones so there is no genre which benefits from mastering on headphones. You need to mix and master on the medium which the music will predominantly be played, which are speakers. Add to that the fact that near-field and mid-field monitors are specifically manufactured, marketed and represented by their lack of color and flat response, and you have even more good reasons why headphones cannot compete in the mastering process. Headphones, by virtue of physics, cannot represent bass waves below a certain threshold with any amount of even response since their drivers and cones are not large enough to reproduce sound below an arbitrary Hz point. Frankly, I'm curious who was claiming mastering on headphones is the best option.
That said, yes using studio headphones as a reference is a good idea in mixing, not particularly in mastering. As has already been said, headphones are great for catching pop, hiss, noise, etc. that could just squeeze by on near-fields. Otherwise, I relegate my studio cans to the job they were purchased for: artist's monitor for vocal recordings.
There are three pillars of music production and engineering: Recording, Mixing, and Mastering. Each arm is a science all of it's own, and you can learn any of the arms of this beast to a certain extent through experience and repeated testing. But, none of these things can be learned to the fullest extent simply through your own experimentation, let alone all three. You need to spend time with those who have attained a mastery of them to truly appreciate how hard some of these "arts" of production and engineering truly are.
On the recording side, as we get better recording equipment we improve ten fold over our initial attempts to record, but the improvements die off until we begin to look at sound dampening, diffusion, proper EQ and FX chains coming in, etc. From the mixing aspect, we improve greatly as we learn how to EQ out unused freqs on instruments, how to use an FX chain to change the color of a sound, how to thicken sounds, etc. but again improvement dies off until we get proper monitoring equipment, diffusion, bass trapping, and learn the fine art of compression, EQ, reverb and delay, etc. And as for Mastering, it is an artform which is both simple and excedingly complex when we look at it. Simply put, Mastering prepares a collection of tracks for print to media, bringing the sounds together, leveling the signal, tuning the EQ sturcture, etc. Anyone can throw a track through Ozone, hit a preset that sounds decent and churn out an mp3. But to truly grasp mastering, you need an excellent room setup with proper QRD diffusion, excellent bass trapping, a spot-on monitoring setup, the lowest signal-to-noise ratio possible, etc.
So, TL;DR: don't believe everything you see on the forum, don't use headphones to master, headphones are best for reference and record monitoring, recording/mixing/mastering are arts which anyone can get into but few can master.