Some ransomware do compromise system restore points, others don't. To do it, they would need to have admin priveliges. But it is not at all unimaginable that malware would have that.
So should you rely on system restore points stored on your hard drive as protections against malware before the infection? Absolutely not! You need to have an external backup.
But could you rely on them to restore lost data after an infection, if you have no other backups? Yes, possibly, but only as a last resort. Be aware that your system may still be infected even after the restoration if the ransomware has infected the system image (or the ransomware could simply have encrypted them as well). You might also want to try to identify the ransomware, and do some research to figure out if that particular strand of malware compromise system restore points or not.
Also, as Tsar points out, system restore points don't contain user data most of the time. So you might not get much back from them.