It could just be that the phone got disconnected from the network. Try rebooting the phone and see what happens.
Also try going to Settings > General > Reset > Reset Network Settings to see if it'll restablish a connection. Be careful: this will not wipe the phone but it does clean out out all of your stored WiFi zones.
This might seem silly but have you paid your bill? Or, are you on the Spending Limit program and hit your cap (usually $200)? Either of those things can get you disconnected.
Check whether your sim is placed properly in the slot. Try to reinsert the Sim. Still if you face the same problem then your phone might be locked to particular Network. To solve this problem you need to get it unlocked. You can get it unlocked your iphone5 safe and securely using Remote unlocking method from the site Mobile-Unloker.com