The legality of ICOs depend on the country. For example - it is legal in USA and is illegal in Bangladesh. As long as the ICO holder doesn’t mislead his users and investors, it is legal, provided it has all the documentation and all of it has been approved by a proper legal counsel. It is legal for everyone involved if the ICO doesn’t misrepresent their coin/token and the investors follow all the rules and regulations of their country.