During the Napoleonic Wars, cavalry could be a decisive factor in a battle. Every power had its own armored cavalry — or, "cuirassiers." During the wars of the middle 19th century — Crimean War (1853-1856), Second Italian War of Independence (1859), Austro-Prussian War (1866) and Franco-Prussian War (1870) — cavalry continued to be used. How effective was it? Did more advanced firearms make cavalry much less effective than it had been earlier in the century? And what about WWI? Were there any major cavalry engagements on the Eastern or Western Fronts? Compared to the Napoleonic era, when did armored/melee cavalry become less valuable? Additionally, when did it become completely obsolete and simply a waste of resources?
Here are a few previous answers I have provided on British Cavalry on the Western Front during the First World War, feel free to ask any followup questions! Cavalry was still very important through the First World War and played a decisive role in a number of theaters (and still an important one on the Western Front).