
Here the light of the sun, which is normally white/yellow appears red. This is due to the dust in the atmosphere. The same effect happens in space. If there is any dust between us and a distant star then it may appear redder than it actually is, though not always (usually, but the "not always" is what makes it so hard). To see a dramatic example of this let us look at an image released by the European Southern Observatory. (Image source and press release here)
These images were taken of the same spot in the sky but at different wavelengths. The wavelengths correspond to visible light (top two on the left) and infered (the other four). The images are ordered from shorter wavelengths (blue) in the top left corner and progressively longer wavelengths (redder) as you go clockwise. As you can see because of the cloud we cannot see any of the blue light coming from the stars behind it. This means that if we look at those stars (assuming that there is not too much dust that it blocks all the light) then they would appear more red than they should.What this means for the HR diagram is that when astronomers are placing stars on the diagram they may end up placing them in the wrong spot. Remember that a star's placement on the diagram depends on its color. This means that if you look at a star and get its spectrum and you do not compensate for dust between us and the star then you will end up miscalculating its temperature, mass and age, all of which depend on getting an accurate spectra from the star. There are ways of estimating the amount of dust between us and a star, or group of stars, but it is something that is still hotly debated. I should also point out that the "dust correction" is not big enough to call into doubt the usefulness of the HR diagram, just as you would not stop using a computer because it crashed occasionally, but we would try to make it so it crashes less often.
Dust is not the only thing that causes problems, for example hydrogen. Given that most stars (almost all) are made up of hydrogen and also hydrogen is a significant fuel source it makes sense that hydrogen emission (light created by electron transitions in a hydrogen atom) would be important. Indeed, as Nick pointed out hydrogen lines were the original basis for star classifications. This can be problematic when there is a significant amount of hydrogen between us and a star. The intervening hydrogen may absorb the light emitted from the hydrogen (or emit more light) than is actually coming from the star. This will make the star's spectrum appear differently than it actually is and may change the classification of the star. Again there is a way to acount for this, but it too is a field of research in itself.