In the Mexican American War, Mexico lost every engagement with the US despite almost always outnumbering and having a home field advantage.
Were US weapons just that much more superior? Or was it more to do with tactics and leadership? What made the war so incredibly one-sided?
America militarily benefited from rank and file experience with firearms, a generally superior logistical apparatus that kept the men supplied with up to date firearms and artillery support, and a cadre of innovative generals. Various indications, especially the naval experience, also indicate that even at this time, the two nations fought at different levels of technology.
America had West Point, which already supplied the small army with a very good cadre of officers, a professionalism which Mexico often lacked due to cronyism, counterproductive experiences during their revolution, and simple fiscal limitations. America's army was small but up-to-date, especially with artillery of standard bore sizes. American culture had an affinity with rifles and marksmanship, and in their literate society, even the rank and file were loyal to the cause, at least amongst those not in the habit of desertion!
Mexico lacked America's advantages in literacy, adaptability, and traditions of marksmanship. It may seem counterintuitive, but Mexico in some ways suffered from the influence of its military elite, who wasted money on a top heavy military officer infrastructure rather than on weapon reforms. Her elite focused much on the last war, where the top generals had often served in the cavalry rather than artillery. Much has been made about how Mexico's infantry swarms were less politically literate, more prone to desertion, badly treated by the elite, and far less experienced with accurate fire. There may be some truth to this, but it also appears that Mexico's infantry were badly served by artillery support and leadership gaffes.
Technologically, it seems that already America's military was more advanced than Mexico's. Winfield Scott's invasion of central Mexico was made possible by an incredibly well-armed naval fleet that shattered Veracruz' defenses. Mexico could never have dreamed of accomplishing the same effort in the Chesapeake. Even at Alamo and San Jacinto, the Texan rebels often fought with better weapons than the Mexican rank and file. In battle, especially at Buena Vista, American artillery shredded Mexican advances. After a certain point, iron beats flesh, and it is not surprising that badly armed Mexican forces suffered from technical deficiencies.