1. Check the Ring/Silent switch on the side of iPhone. When it is on RING, there is no red dot and it is lined up with your volume switches. When it is SILENT, you should see a red dot and it is not lined up with your volume switches. When set to silent, iPhone doesn’t play any ring, alert, or effects sounds. It does, however, play alarms set using Clock.
2. Check Settings -> Sounds -> Keyboard Clicks (at the bottom of the page) and make sure it's ON.
3. Restart your phone: Press and hold the Sleep/Wake button until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the Sleep/Wake until the Apple logo appears.
4. Reset your phone: Press and hold the Sleep/Wake button and the Home button at the
same time for at least ten seconds, until the Apple logo appears.