The vehicle behind would probably be cited for following to closely (If in fact it was following too closely); the car in front would be cited for an equipment violation for the non-working brake lights (assuming one could show they were not working prior to the crash, and not damaged in the crash). In the crash investigation, the brake lights would probably be listed as a contributing factor in the collision. This is all theoretical. Like other posters said, if this really happened, there would be a lot of moving parts, maybe no citations at all depending on how things stand at the investigation.
I don't know for sure, but I think most often insurance companies put the burden on the following vehicle (they expect the vehicle behind to be able to see decrease in speed even without the brake lights).