Few ways, but all depend on the contacts being saved somewhere else. Your Google account may have them, or your service provider account. If the contacts were only on the SIM card, and the info was wiped, contacts will have to be re-created.
Next time when making the contacts, select the Google account from the drop-down as to where the contact will be saved to. And maybe make period backup on a print out or computer file.