How does deforestation reduce rainfall on the one hand and lead to floods on the other?
As your friend answered,
You must be familiar with the water cycle which tells us that a large amount of water is transpired by plants and trees which reaches the cloud in the form of vapours and comes back in the form of water due to condensation in clouds. If the number of trees will decrease due to deforestation, the amount of water transpired will automatically decrease and less water vapours will reach the clouds for rain. So, the rainfall will reduce.
Now let us take an example of an area which has become barren or deforested. If there occurs heavy rainfall in that area, there will be no plants or trees to hold the soil and let the water percolate into the ground by controlling the flow of water which may lead to soil erosion, floods etc.
when we cut trees, the wataer that was going to the atmosphere through transpiration is no more making clouds. so, rainfall does not occur.
the roots of the trees are able to hold water. when we cut trees, the flow of water cannot be avoided. therefore, in this way deforestation leads to floods.