From the Super Mario Wiki
Ads keep the MarioWiki independent and free :)
The manuever is first utilized in Donkey Kong Country and Donkey Kong Land. The attack lets Diddy hit an enemy by cartwheeling into them. If used on a row of enemies, the attack may take the entire row out. A cartwheel is ineffective against bulky enemies (such as Krushas), spiked enemies (such as Zingers), or bosses. Also, if Diddy cartwheels off a ledge, he will be able to jump in midair, thus extending his jumping distance.
Diddy can also use his cartwheel in Donkey Kong 64, where it is one of his basic moves.
Once again, Diddy Kong is able to perform his signature Cartwheel Attack in Donkey Kong Country Returns, Donkey Kong Country Returns 3D, and Donkey Kong Country: Tropical Freeze. The move can be done by shaking the Wii Remote when using Diddy independently, which is possible only during multiplayer or Hard Mode.