Water plays an important role in both physical and chemical weathering of rocks to form soil.
In physical weathering, water seeps into the rocks, which expands on heating and contracts on cooling. This repeated contraction and expansion results in breaking of rocks.
In chemical weathering, water reacts with carbon dioxide to form weak acids. These acids react with rocks and change the chemical composition of rocks. Thus, the rock is separated into soluble and insoluble particles, i.e., rocks break down into smaller pieces.