The short answer to this question is "yes". Do a little research before you buy, and get the best headphones you can afford.
So what's the long answer?
All music is made up of three 'layers': the lows, which is where the beat and the bass live; the mids, which is usually where you'll find the guitar and the melody; and the highs, which is often the home of the vocals and all the stylistic bits that really make a song unique.
For the song to sound best, those three layers need to be balanced. Musicians and sound technicians in recording studio put a huge amount of time, effort, money and expertise into making sure they're perfectly balanced on the recording, but you can waste all that hard work simply by playing that recording through a low-quality speaker set--or a pair of low-quality headphones.
Is that the only reason?
Not at all! There are a few other problems with cheap headphones, and anyone who really appreciates music will want to try their best to avoid them all:
The internal resonances found inside cheaply-constructed headphones lead to a strange 'boxy' quality that can make even a song you've know forever sound drastically different.
Lack of decent bass leaves your music sounding thin and tinny and can reduce even the most bone-shaking song in the world to something that feels weak and neutered.
Earphones without a suitably protective design can be actively damaging to your ears; earbuds will always be a little riskier for your long-term hearing than over-ear headphones, but they're both less likely to cause a problem if they're of a high quality.
The cheaper the headphone, the less likely it is to have decent noise cancellation. This means you really don't want to be using them when you're out and about--you'll drive everyone nearby to distraction!
As with most electronics, inexpensive headphones are much more likely to break; this means you'll need to replace them way more often, which can leave you without music for a few days and could well wind up costing you more money in the long term than a single high-quality investment.
There are plenty of great headphone choices on the market, and which one is right for you will depend on you precise requirements. It's definitely worth going for something a little better than the basic, though--you won't regret it in the longer term.