I could be totally off here...but my understanding of RAW is different than the previous response. In my book, RAW is the image as seen through the lense. It hits the senor and is stored just as it is seen by the senor. The JPG is processed by the camera settings to add color tones and other processing determined by settings you chose on the camera. Now...you can take that RAW image and open it with the software on your computer and apply the same processing as the camera did to come up with the JPG...or you can adjust those settings to modify the image.
So when you think you are seeing a better quality photo, realize that what you see is what the glass in your lense sent to the sensor. Now you can manipulate it to look exactly like the JPG that was also stored (assuming you shoot RAW + JPG). So it's not that it is a better picture...it's just the original unprocessed picture. Your eye doesn't seem to like what your in-camera processing is creating from that RAW photo. Change the settings on ther camera and you may end up with an even more pleasing JPG. Or just take the raw and apply post processing on the computer. It gives you more control.