Increasing the lifetime of the network is one of the key research issues in Wireless Sensor Networks. Sensor nodes residing in hot spot locations get drained out of energy very quickly, which leads to disruption in operations of the network. Thus, a cluster-based algorithm for increasing energy efficiency is required to extend the lifetime of the network. In this research work, Cross-layer Energy based Clustering (CEC) technique is proposed to form clusters of sensor nodes in hexagonal shape. The cluster head has opted from the members of cluster itself on the basis of the ideal cluster head distance and the remaining energy of sensor nodes. In order to make a balance between the consumption of energy and the network traffic, the rotation of cluster heads is performed dynamically. The energy level of a node also gets affected due to collisions happening during the transmissions. These collisions can be prevented by applying protocols which are free of contention. In addition to this, slots are allocated by cluster head to all member nodes within a cluster on the basis of their remaining energy so that nodes can switch to sleep mode. Further, to reduce the consumption of energy, data aggregation is also used on the basis of the remaining energy of the cluster head. The performance of proposed CEC technique is evaluated and compared with existing techniques such as SOEECP, LCM and EEPCA. Experimental results show that CEC performs better than existing techniques in measures of the lifetime of the network, consumption of energy, the number of data packets received and accuracy of aggregated data along with the statistical analysis.