Proton exchange membrane fuel cells, as a renewable energy device, are highly regarded for their efficiency, high power density, and clean byproducts. A dependable method for assessing fuel cell conditions, particularly humidity levels, is crucial for enhancing their durability. This study employs full-frequency electrochemical impedance spectroscopy to diagnose humidity in hydrogen fuel cells. Seven humidity conditions were identified, with discharge curves and Electrochemical Impedance Spectroscopy data collected for each. We evaluated the predictive performance of various algorithms, indicating that advanced models (Extreme Learning Machine, Random Forest and Artificial Neural Network) exhibited more exceptional capability to classify impedance data and predict cell status than that of baseline one. Long Short-Term Memory networks were then used to forecast the lifespan from constant current discharge curves across the seven conditions, revealing a significant link between humidity and fuel cell longevity. The above content will provide a research foundation for accurately, quickly, and non-destructively evaluating the operating conditions of fuel cells, and will greatly solve the durability problem in practical applications of fuel cells and other renewable energy systems.