It depends on the case you are convicted. If you have a criminal background and you still want to come to Thailand to retire, it may be possible, it may be a good idea to contact a legal professional and gain some insight and guidance into how best to proceed.
Live your best life in Thailand. Get help with Visas, accomodation, itineraties, retirement, dating and anything else in Thailand.