U.S. stocks posted solid gains on Monday as energy shares climbed on the back of a big rally in crude oil prices.