Water damage and carpet cleaning is dependent upon the source of the water that caused the damage. If the water damage is from a category 2 (grey water source), it is recommended that the carpet be cleaned.
You never know what could be in your carpet after you have had water damage and many insurance companies will pay to have carpet cleaned after the structure has been dried out, especially if the water is from a category 2 (or grey water source). If your carpet has been affected by a category 3 water source (black water), the carpet, carpet pad and tact strips will need to be removed and properly disposed of. If the water is from a category 1 (clean water source), it is not normally necessary to have the carpets cleaned. The important thing to remember is to discuss the above with the restoration professional as well as your insurance carrier.