In this paper, a routing algorithm for the communication of power wireless sensor networks based on improved harmony search is proposed to reduce the communication routing delay and energy consumption of power wireless sensor networks. Firstly, according to the composition of communication routing delay and energy consumption of power wireless sensor networks, the delay model and energy consumption model are constructed respectively, and the objective function is constructed by assigning different weights. Then, artificial bee colony algorithm and Levy flight mechanism improved harmony search algorithm are adopted for solving the objective function. Experiment results reveal that the algorithm can meet different users’ different demands on delay and energy consumption. If the user needs low delay, set the low delay weight to 1 and the power consumption weight to 0, then the average delay is 7s, and the average power consumption is 3203J. When user demand is low energy consumption, set the delay weight to 0 and the energy consumption weight to 1, so that the average energy consumption is 2667J and the average delay is 15s, which can meet the needs of users.