This paper focuses on the selection of cluster head using neural networks for optimizing the network lifetime which could be used for energy efficient routing in wireless sensor networks. In cluster-based routing, special nodes called cluster heads form a wireless backbone to the sink. Each cluster heads collects data from the sensors belonging to its cluster and forwards it to the sink. In heterogeneous networks, cluster heads have powerful energy devices in contrast to homogeneous networks where all nodes have uniform and limited resource energy. It is essential to avoid quick depletion of cluster heads. Hence, the cluster head role rotates, i.e., each node works as a cluster head for a limited period of time.