During sieges Napoleon's sappers used steel helmets and cuirasses. So did heavy cavalry at the time, although their helmets served mostly as protection against saber. That, and they also made soldiers look good.
Why they did fell out of the favour for a line troops? Well, for a long battles were generally decided in open field and by musket/rife fire or cannon fire. Cannon fire is more direct, than, say, howitzer fire, so shrapnels attack more horizotally than vertically. That made helmets useless, since they offered no protections against such fire. Of course there were sieges of American Civil War or the Crimean War, when indirect fire was more common, but I do not know wheter helmets were used at the time.
WW1 meant come back for helmets, because they served mostly to protect soldiers from shapnels and debris raining down on them while they were in trenches. They did not protect form direct fire, most rifle bullets could easily pierce a WW1 helmet, unless from very large distance. Notice, that AFAIK no army used steel helmets in first years of WW1, before beginning of the trench war.