Burmy and Wormadam are quite unique Pokémon in that their physical forms depend on where they are fighting. Also, the form Burmy is in when he evolves determines what form he will take on Wormadam. Here's everything you need to know about the various forms of Burmy and Wormadam and how to get them in Pokémon Brilliant Diamond and Brilliant Pearl.
Burmy has three different forms it can take: the plant mantle, the sandy mantle, and the junk mantle. The form the Pokémon takes depends on where you last used it in battle. Using Burmy in grassy areas will cause him to adopt the Vegetable Cloak, while battles inside caves or on the beaches will trigger the appearance of his Sandy Cloak. Finally, fight inside a building with Burmy to get his Trash Cloak. None of Burmy's forms have a discernible impact on Pokémon's abilities in battle, but they control which form - as well as which type - Wormadam will take on Burmy's evolution.
At level 20, a female Burmy will evolve into a Wormadam; males evolve into Mothim, which has only one physical form. If the evolving Burmy wears its vegetal cloak, the Wormadam will be of the Bug / Grass-type. If Sandy Cloak is present, the Pokémon will be Bug / Ground-type. Finally, an evolving Burmy hiding in the trash will create a Beetle / Steel-type Wormadam. Unlike Burmy's forms, Wormadam's are permanent, so be careful where you're taking your Burmy if you're looking to search for a specific type of Wormadam.