Does modifying the contrast of an image change the dynamic range of a photograph?
Does it make it better quality?
Depends on what you are referring to.
On the image above, the middle one is the original, the left one is with decreased contrast (notice how it is more dull) and the one in the right has increased contrast (more vivid). You can clearly see a loss in detail on the one in the right, with increased contrast, whereas there really isn't any gain in details in the one in the left. Why? For two reasons:
On the other hand, if your camera / film has a good dynamic range and you do your magic while developing the film or if you edit RAW, you can gain a lot of details by decreasing the contrast and messing around with some other lightning settings - the dynamic range is set by your camera/film, but you can mess around with it, paying the price for it, which is loss/gain in details for gain/loss in vivid tones. I can't develop the picture again, but I edited only certain areas of it to simulate it:
You can clearly see in the sky and buildings (brighter tones) that I gained a lot of details by decreasing the contrast and messing with some other lightning settings.
Dynamic range of an image (as opposed to an image sensor) is simply the ratio between the brightest and darkest pixel values. An image of fixed bit depth thus has a fixed maximum dynamic range.
Increasing contrast will increase the dynamic range but only up to the maximum possible given the bit depth.
Whether or not increasing contrast will improve an image depends on many factors. More contrast will make an image bolder, more striking, but too much contrast can destroy an image and leave it looking distinctly "unreal". A low contrast image will invoke different feelings and there are times when this is more appropriate.
Here's an image which I decided looked better with a lower overall contrast:
First rough edit.