From the Super Mario Wiki, the Mario encyclopedia
The maneuver is first utilized in Donkey Kong Country and Donkey Kong Land. Diddy can defeat most enemies by cartwheeling into them. If Diddy uses it on a row of enemies, the attack may take out the entire row. A cartwheel is ineffective against bulky enemies (such as Krushas), spiked enemies (such as Zingers), or bosses. If Diddy cartwheels off a ledge, he can perform an extended jump in midair. The cartwheel jump must usually be performed to reach areas, such as moving between treetops of Jungle Hijinxs.
In Donkey Kong 64, the cartwheel returns as one of Diddy's 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.
In the Super Smash Bros. series, Diddy performs this move as his dash and neutral aerial attacks.