U.S. stocks closed lower as investors digested earnings reports and weighed weaker-than-expected data.