If I put a piece of wood in a humid environment (basically humid air), it will start to rot. Does the humidity influence the rotting speed, and if so, what is the relation between the rotting speed and humidity?
Rotting is a biochemical reaction: basically catabolism (breaking down of complex compounds to simpler compounds). Cellulose or lignin or any other structural polysaccharide will not undergo spontaneous hydrolysis. This reaction is catalyzed by enzymes produced by the microorganisms like fungi and bacteria (the term for these decomposers is saprophyte). Saprophytes prefer to grow in humid and warm environments.
So the primary role of humidity is to promote the growth of decomposers. Simultaneously it provides the water required for the hydrolysis.
I'm afraid this is not a topic of chemistry, the main degradation process in wood decay is a matter of biological attack, of course life needs water so if the ambient is very humid the wood decompose very well if the ambient is dry the wood can be conserved easier. However wood is not a substance but a complex material, you have to investigate the degradation process for all the components. Chemically holocellulose is the most degradable part of wood, his microcrystalline structure improve the resistance but cycle of imbibitions can blow up the structure leading to a larger surface more suitable for degradation. The hydrolysis of cellulose however doesn't occur at normal temperature only peeling off can occur under 100 °C. Lignin is more and more durable if a little bunch of micro and macro organism wouldn't decompose it we would be sub-merged by a large quantity of lignin.