One sees a lot of cuirasses, helmets and coats of mail from Persia and India dating to the 17th, 18th and even the 19th century. Meanwhile, European armies were abandoning their superior armour around the mid-17th century. Why did the use of armour persist in the Middle East?
Armour wasn't useless in the age of gunpowder. Armour isn't useless today. There's only a few relatively small periods with no armour at all fielded in European armies, and only if we ignore helmets. Europe did not abandon armour in the 17th century, though it did become less common, and was abandoned/re-issued in different countries throughout the 17th-19th century for varying lengths of time.
The biggest reason for the decline of simple steel armour is that the weight of armour needed to stop a projectile increased as projectile energy increased. Armour was expensive to begin with, and heavier armour is more expensive still. When you need your infantry to march long distances, to shoot and be shot at, there comes a point when the gains of armour don't outweigh the costs. For infantry, that happened quite early on, though not permanently. For Cavalry, that only truly happened with the end of cavalry itself.
Steel cuirasses were still in use on cavalry into the 19th century in European armies, though inconsistently. Cavalry units were generally elites, either with more funding from the army, or funded by their wealthy members, they would be much better equipped than the infantry. With their horses allowing them to carry more weight without tiring so quickly, armour was not as much a detriment, and the protection offered was quite desirable for men charging into melee with musket-armed infantry. French Cuirassiers were still wearing armour into combat in the Franco-Prussian war in the 1870s.
This armour was all sufficient to provide reasonable protection against the firearms of the day. They wouldn't always stop a shot fired at point-blank distances from muskets, and they certainly wouldn't protect against field artillery. They were however still proofed against specific targets, depending on what the buyer was willing to pay. A cuirass would be shot at some range with some firearm to show that it would stop that shot.
Cavalry, however, was soon to fall out of favour. Sending the best and brightest to attack infantry with their swords was getting less and less effective as firearms improved. Sending a hundred horsemen into a breaking line of infantry armed with muzzle loaders was a powerful tactic, but it doesn't work as well when there are plenty of repeating rifles and occasional machine guns on the field.
The weapons deserve a look as well. They were dealing with fairly large calibre lead projectiles with black powder propellant. These are low-velocity, fairly soft projectiles. While very effective against soft human targets, they aren't particularly good at penetrating hard targets. By the mid-19th century they were starting to be round-nosed with flat bases rather than simple balls, which improved accuracy. In the later 19th century, they began using longer narrower projectiles with larger powder loads in metal cartridges, which greatly improved velocity and penetration. (Speaking of military rifles, specifically. Cartridges were available earlier, but less common in military use.) That improvement reduced the effectiveness of armour. And then, as a final nail in the coffin of classic body armour, the spitzer bullet and the metal jacketed bullet began spreading across western armies in the late-19th and early-20th centuries. Along with changes from muzzle loaders to breach loaders to cartridges to repeaters, and the introduction of machine guns, body armour and cavalry was scrapped, and even helmets went out of service in some armies.
In the trenches of the first world war, ersatz armour made its way into the front lines. As far as I'm aware, there was no officially issued armour in any of the major armies involved, but many soldiers were looking for any options to preserve themselves. Tankers developed armour to protect themselves against spalling. Helmets were near universal by the end of the war. Trench raiders were fielding heavier and heavier armour. These men didn't have to march mile upon mile to reach the battlefield, they were sleeping on it for months. The extra weight didn't need to be hauled as far, shrapnel and small arms fire were a more common threat, and even clubs and shovels were being put to deadly use.
After the first world war, armour mostly fell out of common use again for a time. Helmets were still universal, but body armour was mostly dead once again. Until the second world war, when Wilkinson Sword developed the flak jacket, and the concept was pitched for British bomber crews. Unfortunately for the RAF airmen, the vests were found to be too bulky to be issued, but the USAAF gladly issued them out to bomber crews, as did the US Navy for aircraft carrier crews.
Then, starting in the Vietnam era, standard infantry began to once again be issued body armour, and today body armour is standard issue across most major militaries.
As kind of a follow up, I understand that some regiments in 19th century Europe DID use armor. Here's a picture of french armor used during the the Napoleonic wars.
How effective was this armor? Why did only some units (cavalry, apparently?) use it in the 19th century when in the 17th century Europe was able to equip entire armies with similar suits of armor? Even if the armor wasn't 100% proof against 19th century weapons, it must have done SOMETHING. Why was 19th century Europe, despite 2 centuries of economic and industrial development, not able to provide their armies with a 17th century level of protection?