Forecasting geomagnetic storms is crucial for mitigating their potential impacts on technology and infrastructure. This research explores the use of artificial intelligence (AI) techniques, particularly linear regression, and Long Short-Term Memory (LSTM) networks, for predicting geomagnetic storms using the OMNI dataset. The dataset, comprising various solar and interplanetary parameters, was preprocessed by scaling features and removing null values. A linear regression model achieved a Root Mean Squared Error (RMSE) of 5.95 and an R² score of 0.77. In contrast, the LSTM model, designed to capture temporal dependencies, significantly outperformed linear regression with an RMSE of 1.46 and an R² score of 0.99. These results demonstrate the potential of LSTM networks in accurately forecasting geomagnetic activity, thus providing a valuable tool for space weather prediction and the protection of critical technological systems.