Both countries are very safe for tourists. It's very unlikely that you experience any kind of violent crime in Thailand or in Malaysia. However, statistics show that Malaysia is slightly safer than Thailand. The biggest threat to tourists is probably road safety.