Most of the sensor nodes have multiple inexpensive and unreliable sensors embedded in them. For many applications, readings from multiple sensors are aggregated. However, the presence of malicious attacks adds a challenge to sensor data aggregation. Detection of those compromised and unreliable sensors and sensor nodes is important for robust data aggregation as well as their management and maintenance. In this work, we develop a method for identification of good and bad sensor nodes and apply it for secure data aggregation algorithms. We consider altered/unreliable readings as outliers and identify them using an augmented and modified version of a local outlier factor computation method. We use the outlier detection algorithm for reliable and unreliable sensor detection and use the results from this algorithm for an unreliable sensor-node identification algorithm. We show its usefulness for secure data aggregation algorithms. Extensive evaluations of the proposed algorithm show that it identifies good and bad nodes and estimates true sensor value efficiently.