Wireless sensor networks (WSNs) struggle with energy efficiency because of limited node power. This paper presents an approach that uses evolutionary algorithms to choose the Cluster Head (CH) and optimize routing in wireless sensor networks (WSNs) using grid-based topologies. The proposed method repeatedly develops solutions based on criteria for node density, distance, and energy level by using the evolutionary capabilities of the genetic algorithm. A fitness function that considers latency, coverage, and energy efficiency is used to evaluate the solutions. The process selects CHs dynamically and uses GA-guided optimization to construct paths. Simulation results indicate improved network performance and energy efficiency over existing protocols. Evolutionary algorithm integration enables flexibility and optimization for energy-efficient CH selection and routing in WSNs with a grid-based design.