The honey badger algorithm (HBA) is a meta-heuristic optimization algorithm that simulates the foraging behavior of honey badgers. Since the algorithm is prone to premature convergence when solving complex optimization problems. To improve the overall optimization performance of the basic HBA, this paper develops a modified HBA named SaCHBA_PDN based on the Bernoulli shift map, piecewise optimal decreasing neighborhood, and horizontal crossing with strategy adaptation and applies it to solve the unmanned aerial vehicle (UAV) path planning problem. Firstly, the Bernoulli shift map is invoked to the HBA algorithm to change its initialization process, thus increasing the diversity of the population and speeding up the convergence speed. Secondly, a new piecewise optimal decreasing neighborhood strategy (PODNS) is proposed to address the shortcomings of unbalanced convergence of the traditional optimal neighborhood strategy. The proposed PODNS increases the optimization efficiency of HBA and enhances the local search ability to avoid falling into the local optimum. Finally, a novel horizontal crossing with strategy adaptation is introduced to balance exploration and exploitation and enhance the global optimization ability. These strategies collaborate to enhance HBA in accelerating overall performance. The superiority of SaCHBA_PDN is comprehensively verified by comparing it with the original HBA and numerous celebrated and newly developed algorithms on the well-known 23 classical benchmark functions and IEEE CEC2017 test suite, respectively. Experimental results show that SaCHBA_PDN has a better performance than other optimization algorithms. Furthermore, SaCHBA_PDN is used to solve a UAV path planning problem based on the threat source model and applied to circular and irregular obstacle scenarios as well as two-dimensional grid maps. Simulation results show that SaCHBA_PDN can obtain more feasible and efficient paths in different obstacle environments.