Ensuring the reliable and energy efficient data routing in Wireless Sensor Networks (WSNs) is still remains one of the challenging and demanding tasks due to its dynamic architecture. For this purpose, the different types of routing methodologies and security schemes have been developed in the conventional works. However, it faced the problems related to increased network overhead, high cost consumption, reduced Quality of Service (QoS), and inefficient bandwidth utilization. The main contribution of this work is to implement an optimization based secured routing methodology for establishing an energy efficient data communication in WSNs. For clustering the nodes, the parameters such as residual energy, trust score, and mobility have been considered, which also helps to simplify the networking operations. Moreover, the outliers in the network are detected with the help of Spatial Temporal Fuzzy Inference System technique, which generates the set of inference rules based on the distance, energy, and mobility measures. Also, the Crow-Whale Optimized Secured Robin Routing (CWOSRR) is used to enable the data transmission in the network through the optimized path, which avoids the loss of information. During the simulation analysis, the results of the proposed technique is validated and compared by using various performance measures.