Many people here seem to forget that the Mongols had little experience with the way Europeans make war, especially heavy cavalry and heavy crossbows. Hungary was conquered chiefly because it was in its weakest position. The king wanted to bring the nobles in line and centralize the state, which alienated them to the point that they didn't even answer the call to arms when the Mongols came. Then they slaughtered the Cuman leader, which caused the Cumans to leave Hungarian service, even though their light cavalry would have proven crucial in the coming battle. Then there's the issue of the king being not much of a general (he was a good administrator and organizer, but pretty bad when it came to strategy and tactics). When the Mongols were spotted on the other side of the river, a certain bishop, whose name eludes me rode out with a number of men from the camp, mostly knights and crossbowmen. They virtually destroyed the Mongol vanguard, who probably never faced Western heavy cavalry. He left crossbowmen to guard the river crossing (I don't remember if there was a bridge or not). He returned to camp and was shocked to see that the king did not even rouse the camp and wasn't even wearing his armor. The heavy crossbowmen in the meantime held off the Mongols, who failed to cross the river, and only managed to defeat the Hungarians when they found a crossing to the north and could surround them. The defenders expected the rest of the army to arrive, but they never came, since they weren't ready. They instead magaged to fortify the camp and wait for the Mongols, which proved to be a bad tactic in the open field. Hungarian heavy cavalry still managed to inflict heavy casualties to the enemy before they went down. This was no small feat, and we have to remember that Hungarians had less heavy knights than say, the Germans. Same thing with castles and fortresses. The Mongols may have had experience in siege tactics, yet they failed to completely subdue Hungary over the span of two years. Large rivers are also an issue. They could only cross the Danube when it froze over.
By 1280, the Hungarians built more stone castles and reformed the army to better fight the Mongols, and the second Mongol invasion of Hungary by Nogai Khan was a complete disaster.