Assuming that all ICO's are considered by the SEC to be securities, my cursory research suggests that there are two ways you can invest in them legally.
1. ICO issuer registers with the SEC and complies with securities laws- everyone can invest
2. ICO issuer does not register with the SEC- only accredited investors can invest
Scenario 1 is fairly unlikely, and most ICO issuers usually don't care to ensure that all investors are accredited, so they more often just don't allow US investors.
Source:
https://www.sec.gov/oiea/investor-alerts-and-bulletins/ib_coinofferings