Timely and accurate identification of peanut pests and diseases, coupled with effective countermeasures, is pivotal for ensuring high-quality and efficient peanut production. Despite the prevalence of pests and diseases in peanut cultivation, challenges such as minute disease spots, the elusive nature of pests, and intricate environmental conditions often lead to diminished identification accuracy and efficiency. Moreover, continuous monitoring of peanut health in real-world agricultural settings demands solutions that are computationally efficient. Traditional deep learning models often require substantial computational resources, limiting their practical applicability. In response to these challenges, we introduce LSCDNet (Lightweight Sandglass and Coordinate Attention Network), a streamlined model derived from DenseNet. LSCDNet preserves only the transition layers to reduce feature map dimensionality, simplifying the model's complexity. The inclusion of a sandglass block bolsters features extraction capabilities, mitigating potential information loss due to dimensionality reduction. Additionally, the incorporation of coordinate attention addresses issues related to positional information loss during feature extraction. Experimental results showcase that LSCDNet achieved impressive metrics with accuracy, precision, recall, and Fl score of 96.67, 98.05, 95.56, and 96.79%, respectively, while maintaining a compact parameter count of merely 0.59 million. When compared with established models such as MobileNetV1, MobileNetV2, NASNetMobile, DenseNet-121, InceptionV3, and X-ception, LSCDNet outperformed with accuracy gains of 2.65, 4.87, 8.71, 5.04, 6.32, and 8.2%, respectively, accompanied by substantially fewer parameters. Lastly, we deployed the LSCDNet model on Raspberry Pi for practical testing and application and achieved an average recognition accuracy of 85.36%, thereby meeting real-world operational requirements.