Asking preferably for the British, Russian, and German armies but any major power will do!
For example one thing I wonder about is, how did officers decide it was a good time to launch a bayonet charge during the Napoleonic Wars compared to WW2?
Or How did the views by military theorists and commanders on bayonet combat differ between these 2 time periods?
Also, Did the tactical value of bayonet charges decrease by the time WW2 rolled around? Or were they still well regarded by this time as a "Hail Mary" tactic?
In the early nineteenth century, bayonet charges were delivered as the final blow to the enemy's line---that is, when the commander perceived the enemy's line to be weakening, he would call for a bayonet charge to break the enemy's morale and drive him back.
This line of thinking persisted until the First World War. The British Field Service Regulations (1909) regarded the bayonet attack as the culmination of the fire fight. When your infantry line established fire superiority (a vague concept in its own), the line would charge forward and take the enemy with the bayonet.
The battles of 1914 made pretty clear that the bayonet charge was not practical against machine guns, quick-firing artillery, and bolt-action rifles. The casualties of 1914 were the highest in proportion to the number of engaged troops for any year of the war.
By the end of the war in 1918, the idea of the bayonet charge had largely been replaced with small unit infantry tactics and coordinated combined arms tactics with artillery and, in the British army, tanks. Bayonet fighting was still necessary, but usually only in the close confines of trench combat.
By the Second World War, soldiers still carried bayonets, but like the later years of the First World War, they were mostly for close-quarters combat with enemy infantry. The major exception is the Japanese "banzai" charge, which in some ways resembled earlier Western bayonet attacks in that it was meant to shock the enemy line. They proved largely ineffective against U.S. units armed to the teeth with semiautomatic rifles and heavy machine guns.
Sources: Clausewitz, On War; War Office, Field Service Regulations; Spector, Eagle Against the Sun