Solar energy is one of the main renewable energy sources capable of contributing to global energy demand. However, the solar resource is intermittent, making its integration into the electrical system a difficult task. Here, we present and compare two machine learning techniques, deep learning (DL) and support vector regression (SVR), to verify their behavior for solar forecasting. Our testing from Spain showed that the mean absolute percentage error for predictions using DL and SVR is 7.9% and 8.52%, respectively. The DL achieved the best results for solar energy forecast, but it is worth mentioning that the SVR also obtained satisfactory results.