Nowadays, wireless sensor networks have found many applications in various industries. Due to the wireless nature of sensor networks, data collected from sensors embedded in the target monitoring environment may be lost during the transmission path for various reasons. Therefore, creating a secure communication path in sensor networks is of great importance in various fields. In this research, in order to provide a reliable data transmission protocol in the wireless sensor network, a reliable routing method using sunflower meta-heuristic algorithm is presented. The proposed approach uses the sunflower algorithm in a multi-objective manner to determine the best route of packets to send to the sink. In the proposed approach, each node that sends the packet to the sink determines the best path using several parameters. In fact, in the proposed algorithm, the path length parameters, the amount of energy used to send the packet, the reliability and the number of hops required to deliver the packet to the sink are considered. In order to compare and evaluate, the famous LEACH method has been implemented in the MATLAB environment along with the proposed method and its results have been shown in the form of energy consumption criteria, the number of remaining live nodes, network throughput, reliability and hop count. has been The evaluation results show that the proposed method has far better results than the compared LEACH method in all criteria except the average number of jumps.