If your iPhone reboots to safe mode every time you do a restart (hard reset or normal restart), you're mostly a victim of an incompatible Cydia package or a problematic Winterboard themes.
I've had my iPhone go crazy a few times over the weekend, and it restarts to safe mode. When I exit the safe mode, I get an information saying that the Mobile Substrate hasn't caused the problem but still. Anyway, I restart, and it switches back to safe mode again.
The problem, in most cases, is due to incompatible Cydia tweaks or packages. Or may be due to an impending upgrade that you failed to do on Cydia.
Anyway, here are some ways to fix “Exit Safe Mode” the error and troubleshoot the safe mode problem on your iPhone.
Usually, a respring should fix the problem, but in some cases, it doesn't. For me, respring did fix the issue a little earlier. However, if you can't respring, you'll need to reboot. When you tap on ‘Exit Safe Mode' on the status bar, you'll get an option to reboot. If things work fine after a reboot, you're safe.
Update Cydia Packages
If some packages are waiting to be updated in Cydia, it is better to update them (but check out with the developer/package if the update doesn't cause any issues. It happens a lot of times). Once you've updated, reboot your device. If things work fine, the iPhone should reboot normally.
Remove Erratic/Incompatible Packages
If it still doesn't work and you are forced to log into safe mode automatically, it's time to do some spring cleaning in Cydia. Open Cydia and remove packages that you recently installed (mostly the ones after which the auto-safe-mode problem started). Queue them up if there are a lot of packages to be removed. And then remove them. Reboot the iPhone to see if it boots up correctly.
If things still don't work usually, you might have to bite the bullet and rejailbreak your iOS device. It's usually not recommended, but I'd rather vote for it if things are really that bad.
But if things really don't work at all, you might have to restore your iOS device. But be sure that the problem you're trying to nail down persists even after you've tried all the previous methods. If even after removing all Cydia packages that you installed (not the ones that Cydia comes bundled with), your iPhone goes berserk and reboots to safe mode, you should try to restore it.