As a melee fighter, heavy cavalry would have depended on armor to block melee weapons once they got in range, and that alone would justify its use. As far as effectiveness against firearms the best I've ever found is that quality armor of the time was somewhat effective against small arms and muskets at range, though muskets could easily penetrate at close range. While I haven't been able to find exact distances, I would expect this also gave Heavy Cavalry a range where musket fire was ineffective and they would be able to close before infantry could reload.
Rifles of the period had longer range and took longer to reload, which would indicate they were more effective against armor though it may have been a wash due to longer reload times, but I can't conform that. Rifles and rifle companies were also far less common at the time so the decision to wear armor was likely based more on fighting musket armed soldiers as that was the more common opponent.