Not federal, but this: https://codes.findlaw.com/ca/civil-code/civ-sect-3344/ To be clear by 'commercial purposes', it's advertising/promotion/marketing. Paparazzi photos would be alright by that bar. I presume the idea is to avoid any implied endorsement by those photographed.
It's called the right of publicity. Basically the idea that you're entitled to compensation to for commercial use of your likeness. AFAIK, you always have to be recognizable to sue over it as you have to see your likeness, and damages would be pretty minor if you're not famous or an actor anyway. It depends on the state but generally it does have to be in advertising.