Regarded by admirers and opponents alike as an indispensable Napoleon of the West, Santa Anna initially led an early military career marked not only by opportunism, but also by success. Why did his military success turn into repeated failure, especially in his dealings against Texan and US armies?
The short answer would be that Santa Anna was operating with outdated equipment. I hate to use the battle near Palo Alto, Texas in 1846 as a case study because the Mexican army there was under the command of General Mariano Arista, but that particular battle highlights the difference in military equipment that was one of the main issues of the Mexican-American War. Artillery won at Palo Alto and artillery was key to US success for the campaigns in Mexico.
The US created its first light artillery battalion with the Act of 1821. In 1824, the US opened the Artillery School of Practice in Fort Monroe, Virginia. In 1836, the Army began to truly field these light artillery battalions. This "flying artillery" were horse drawn and capable of rapid deployment and repositioning on the field, faster rate of fire, and greater range. In addition, the US had switched over to an explosive shell instead of solid shot.
Mexico, on the other hand, were using older cannons. They also still used solid shot. Witnesses at Palo Alto said that the Mexican rounds traveled so slow that the troops would see them and open ranks to allow the rounds to pass. While this statement is very likely hyperbole, the fact is that the Mexican artillery was unable to provide much effects against the massed US infantry.
At Palo Alto, the US artillery fired volley after volley into the Mexican ranks. Arista attmepted to sway the battle by sending the more experienced and battle tested Mexican cavalry to flank the artillery lines. Brevet Major Ringgold, commander of the artillery battery at Palo Alto, was able to have his battery cease firing on the Mexican infantry, turn to face the cavalry charge, direct lay the guns to engage the cavalry with the cannons, and return to their engagement of the infantry. The conflict ended with the Mexican army breaking ranks and conducting a hasty retreat.
During the campaigns in Meixco, US artillery was able to consistently find advantageous positioning and engage the Mexican army. At Buena Vista, the artillery was able to repulse the Meixcan army, this time commanded by Santa Anna.
Despite the fact that Santa Anna and the Mexican Army usually outnumbered their US opposition, the US had spent 10 years training and equiping their field artillery to overcome that numerical disparity. Santa Anna had the more experienced cavalry and manuever forces, but inadequate weapons for mass formations. While his maneuver capabilities may have rivaled Napoleon, he did not follow Napoleon's love and use of artillery.
References: Allan Millet and Peter Maslowski, For the Common Defense: A Military History of the United States. David Norris, "Opening Moves on the Rio Grande," Military Heritage (June, 2011). R. Powl Smith, "Staying on the Cutting Edge: Military Professionalism and the Mexican War," Field Artillery (July/August, 1998).