Wireless sensor network is composed of a large number of sensor nodes of limited energy resource. The node clustering approach can improve the scalability and lifetime of wireless sensor network. In this paper we propose a novel node clustering protocol based on layered-tree topology for self-organizing distributed wireless sensor networks. It decides optimal number of clusters by employing a new approach for setting threshold value, including the probability of optimum number of cluster-heads and residual energy of the nodes. We also introduce a new scheme for layered-tree construction in each cluster. As a result, the proposed scheme can significantly improve the energy efficiency of the network and increase its lifetime. Computer simulation shows that the proposed scheme effectively reduces and balances the energy consumption of the nodes, and thus significantly extends the network lifetime compared to the existing schemes