Stocks recovered on Monday after tumbling earlier in the day over concerns that the U.S.-Israel attacks on Iran could drive up energy costs.