Wireless sensor networks (WSNs) are mostly used for monitoring the environment; however, they are usually powered by non-rechargeable batteries with limited energy. Solar energy harvesting is an attractive solution to the limit by charging the sensor nodes; however, the harvested solar energy is easily affected by weather conditions. Based on the characteristics of uncertainty and intermittency of solar energy, this paper proposes a plus-profile solar energy prediction algorithm. This algorithm makes the prediction of future available solar energy by finding the data in the dataset that is most similar to the data of the day and combining it with recent weather trend. According to the predicted result, the paper further proposes an adaptive energy management scheme to suit the harvested energy. In the scheme, sensor nodes can adaptively adjust task scheduling to achieve energy neutrality. The simulation results show that compared with other algorithms, the prediction accuracy of the proposed prediction algorithm is improved by 17.7 and 22.4%, respectively, and the proposed energy management scheme reduced energy loss by 6.2 and 46.8%, respectively.