Some iPhone 4 users have reported an issue in which the phone suddenly displays a “No SIM Card Installed” error, either while attempting to make phone calls or during routine usage.
Apple Discussions poster macoverclock writes:
“Keep getting the “no sim card installed” error. phone works for a bit then go to check my email and the error has come up. shut the phone off and turn back on and the sim card is found then a half of an hour later the same error comes up again. this has happened 5 times in the last 5 hours.”
The most reliable fix for this issue is to simply remove your SIM card, clean it lightly using a dry cloth, ensure that there is no debris in the SIM slot, then reinsert the card, ensuring a snug fit. Instructions for doing so can be found in this Apple Knowledge Base article.
Other users have reported that briefly turning on Airplane mode (in Settings) then turning it back off can resolve the problem.