You can usually get your contacts back, if you were either using a backup of some sort or a cloud sync service. If you were using an Android phone, then you most likely had a sync setup with your Google account. Check Gmail under the contact sections to see if you can find them in there.
If you were using an iPhone, then you might have had an iCloud backup turned on, or synced through iTunes. Check both locations.