iPhones produce very good sound when they connected to earphones or headphones. If you want to tweak your iPhone sound quality, try CanOpener app. Basically, it is a music player app that really tweaks your iPhone’s volume and balance.
It gives you a ton of customization options to make your iPhone audio quality much better. The app user interface is well designed, it basically crosstalks to your headphones. You can tweak the crossfeed to get a bigger, natural sound, tweak equalizer settings to adjust your highs and lows. Overall it is a very good app to tweak your iPhone’s sound quality.