Back in September 2015, prior to the release of Star Wars: The Force Awakens, it was announced that the reason behind C-3PO's red arm would be made clear within the pages of a Marvel comic. The comic, Star Wars Special: C-3P0 #1, by James Robinson, Tony Harris, and Joe Caramagna had finally released and it totally comes with an explanation for his red arm.
According to the comic, C-3P0 is wearing the arm of OMRI – an android that self-destructed in order to save C-3PO. While the comic is dense in detail and emotion, a brief look at what caused OMRI to self-destruct and C-3PO to lose his arm can be found below:
C-3PO finds himself with four Resistance droids and one First Order droid on an unidentified planet after their ship crashed into it. The droids escape, only to be lead into a trap by OMRI – the First Order droid who has information on where the First Order took Admiral Ackbar.
After a series of unfortunate events, only C-3PO and OMRI survive. OMRI and C-3PO take shelter under a cover from the planet's acid rain, after C-3PO loses his arm to some kind of creature. While under the cover, C-3PO and OMRI share a conversation that leads OMRI to doubt his First Order initiative.
Once the doubt settles, OMRI gives C-3PO the data on where Ackbar is then self-destructs out in the acid rain. The acid rain strips away OMRI's exterior shell, leaving behind one glistening red arm.
C-3PO takes the arm and wears it to remember his sacrifice… then gets a gold arm back at some point in the movie because apparently he just didn't care anymore.
You can find a more detailed description of the events on io9.