tl;dr version: They take off the plate mail, keeping just the chain mail and the leather / cloth layers underneath it, to trade protection for agility.
This is answered in the extras for The Hobbit - The Battle of the Five Armies Special Extended Edition, in particular in the documentary called Out from the Gate in the first disc of the appendices which provides ample details about how this scene evolved; the following quotations are taken from the subtitles, starting at minute 04:05.
- Initially, the idea was that the dwarf would enter the battlefield in full regalia, wearing the best armor found in Erebor's armory, the same armor they are sporting in the scene where they confront the elves and men:
Peter Jackson: The intention at one stage was to create this armor and that's what they would go into battle with at the end. We just thought that they should - within Erebor - they should adopt a much more regal attitude.
I mean, Thorin is the king, but the others are knights, essentially. Like King Arthur and the Knights of the Round Table, they're all his warrior knights. So we wanted to create this imagery.
- The problem is that the armor proved too heavy and cumbersome for the actors to move well in it, let alone fight.
Dean O'Gorman (Fili): The first impression when you see us ... that's an amazing work of art, really, that I got to wear.
Then you put it on, you're like: "I can't actually do anything".
Jed Brophy (Nori): You couldn't actually lift a weapon. Couldn't lift your arms above your head.
Adam Brown (Ori): It was a great day on set when the decision came that the dwarves were gonna shed their armor.
- Richard Armitage provides an out-of-universe, visual reason too, as the viewers could find it difficult to recognize the characters in the action-packed battle scenes:
Richard Armitage (Thorin): I understood that we needed to see our dwarves, that we had followed for the entire journey; and burying them in armor where you really only see this part of them [the eyes] was a little unsatisfying.
- Moreover and in-universe, removing the plate mail is not a senseless decision, as Thorin's plan to change the course of the battle is to strike down Azog, who is directing the orcs from up on Ravenhill; to reach him, the dwarves have to quickly cross the whole battlefield riding war rams and an iron chariot borrowed from Dain's army, so being light and agile is definitely a plus:
Graham McTavish (Dwalin): They knew that what they were going into when they left Erebor to join the battle was essentially a suicide mission.
So why did they need to wear all this protection? It's just gonna slow them down.
- So, the creative team has to design a "light" version of the armor:
Weta Artist: When we were told about this casting off the armor for battle, from a design point of view, I could work closely with Bob Buck to create a stripped back version, so they took off all the heavy components. The garments you see them wearing are actually what they're wearing underneath all the plate armor.
PJ: That's the stripped down version, it's what they run out in because that was a more practical way in which these guys could actually even fight.
A few screenshots (click to view full size) to summarize what happens in the movies with regard to clothing and armor:
- when leaving from Laketown on boat, the dwarves wear man-sized clothing gifted by the people, together with weapons and some pieces of armor coming from the Laketown Guard
- the ill-fitting armor is discarded as soon as they move ashore (if not earlier still) as it is completely unpractical, so the dwarves remain dressed in cloth and furs while searching for the hidden door, entering Erebor and ultimately making Smaug fly out
- after the death of the dragon, the dwarves have some quiet time to explore Erebor and find proper dwarf-sized garments / light armor, which they are wearing when Fili, Kili, Bofur and Oin join them, still in their Laketown gear
- in order to show the power of Erebor to the elves and men of Laketown coming at the gate the dwarves "dress to impress", donning the regal armor found in the armory (note that many of them are now wielding tall lances instead of their usual weapons of choice)
- when Thorin declares they would not fight, the dejected dwarves remove the heavy and unconfortable pieces of plate armor they are wearing, as they would not need it
- finally, when they decide for a final sortie they keep "only" the dwarven chainmail they were wearing under the plate armor, so they could be faster and more agile