This paper studies the forecasting of solar irradiance using electromagnetism-like neural networks. First, a solar irradiance information platform is set up to collect the relevant data for the solar irradiance forecasting. The solar irradiance information platform includes a pyranometer, a single board computer, a camera and a cloud server. By integrating the software and hardware of the solar irradiance information platform, real-time solar irradiances and sky images can be captured and stored in the MySQL database of the cloud server. Then, these solar irradiances and sky images are used to establish a neural network forecasting system. An improved electromagnetism-like algorithm is used to optimize the neural network prediction system. Finally, some comparison results are given to verify the effectiveness of the method proposed in this paper.