The cameras take a picture of the windshield and they compare the driver’s face to the license photo. If I’m ever at risk of violating a red light camera I flip down my sunvisor and stick my face behind it, just in case. I know it’s not safe and I’ve only had to use that technique twice, but it works. And twins can appear in court and ask the “prosecution” to prove which one of them was the driver. If there’s doubt, the case must be dropped.
The fines are an "administrative sanction", much like a parking ticket or an automatic 90-day license suspension when you are suspected of DWI.