In this paper, passive wireless sensor network technology is used to conduct in-depth research and analysis on the monitoring of the in-transit health status of railway transportation. Safety detection sensors, train communication networks, and other onboard devices organically constitute a train sensor network with comprehensive state sensing, information aggregation, and business collaboration. First, this paper analyzes the three-layer architecture of the sensing layer, network layer, and application layer of the train operation status safety detection sensor network. Based on analyzing the feasibility of Ethernet application in an onboard communication network, ring, multiring, and ladder-type sensor network structure schemes are designed. Next, the real-time performance and reliability of various sensor network structures are analyzed. First, the characteristics of bandwidth demand, priority, and importance of information transmission of each monitoring object are analyzed; then, the system utility function is established according to the bandwidth usage efficiency and communication demand of information transmission of each monitoring object; finally, the bandwidth allocation optimization model is solved by using a particle swarm optimization algorithm, and the remaining bandwidth resources are dynamically rationed on demand while ensuring the complete transmission of basic information of each monitoring object. Rail transit technology has profoundly affected and changed the travel and lifestyle of residents in the new era and will provide strong infrastructure support for the smooth advancement of new urbanization construction and development strategies. The remaining bandwidth resources are dynamically allocated on the premise of ensuring the complete transmission of basic information of each monitoring object. In summary, this paper presents a complete study on the optimal allocation of resources for wireless sensor networks dedicated to rail transit condition monitoring, starting from the perspectives of routing protocol optimization, data fusion rate optimization, and bandwidth dynamic allocation optimization to achieve the efficient use of limited resources. The achieved research results enrich the research content in the field of wireless monitoring of rail transit system conditions at home and abroad in a certain sense and will also provide theoretical and empirical support for practical practitioners, managers, and scholars of service condition monitoring of rail transit systems.