If you have a surround sound system with HDMI inputs then yes. A stereo system would not have HDMI inputs as it does not do video. You would then have to connect the headphone out to the stereo with the correct cable that would have the same connector as the headphones on the PC end and left and right RCA audio connectors at the stereo end. Adjust the volume of the PC so as not to overload the stereo which will make the sound distorted.
There are other more sophisticated way which would require a USB to SPDIF digital audio adapter such as the M2Tech and a digital audio converter that would then connect to the stereo.
i don't think that you would gain very much sound quality from going to hdmi cable for connecting audio from pc to stereo . i think your problem is the source of music from your pc. if you are streaming or playing media in compressed format i would think that could be the cause . cd quality sound is about 44100 samples per a second , windows media player default setting is about 30000 +/- . so windows media player's default quality is 30% lower than cd quality . there is a setting to improve this . most people would think , how come i didn't notice this on the computer speakers , well they are lower powered , lower resolution . so connect the headphone out to your stereo again and play a cd in the cd drive and see what you get , maybe play the same cd in you stereo's cd player to compare . if the volume is still low check your settings and sound card configuration . but more or less you should be able to get a bout the same overall quality playing a cd on a computer as you would a cd player , as for digital media it will vary based on the compression rate and the quality of the digital media .