The obvious reason your iPhone has stopped outputting sound is that your volume has been turned down. It is actually very easy to accidently mute your device when trying to adjust your ringer or just by holding your phone while your display is activated. To adjust the volume on your iPhone, open an app and use the Volume up/down on the left hand side.
If you phone is not on mute and you still have no sound check the Ring/Silent button located above the volume switches. Games and apps will not output sound if your phone is in silent mode. You can tell if your mute switch is activated if it is pressed down and you see a thin red line. The Ring/Silent button is really easy to activate by accident on newer models, such as the iPhone 6s. This is the number one reason your apps or games have no sound.If your volume is up and the Ring/Silent is off, then check the settings of the game you're trying to use. A lot of games offer the ability to disable music and sound effects so players can listen to music while playing or play in public places without headphones.