In this paper, the distributed filtering problem is investigated for a class of nonlinear systems in the wireless sensor networks. The main goal is to design a set of distributed filters and simultaneously to prolong the lifetime of networks. In order to save limited power in sensors, signal quantization is employed to reduce packet size, where the robust control approach is used to handle the quantization error. Then, the communication rate change is allowed and treated under a switched system model. Sufficient conditions are derived such that the filtering error system is exponentially stable in the mean-square sense and achieves a prescribed $H_\infty $ performance level. The filter parameters are determined by solving an optimization problem. Finally, the effectiveness of the proposed results is demonstrated by two numerical examples.