Aerosol cans are not illegal in the United States.  However, their use are regulated by the Environmental Protection Agency, or EPA.  The point of these regulations are to make sure that the contents of the cans do not contain any harmful ingredients.  Most aerosol products have propellants in them that help you spray the product.  These are not necessarily harmful, but still have to meet the standards of the EPA.  If a product has something in it that is not regulated by the EPA, the manufacturer is liable for any harm that it causes the consumer.  In addition to the contents, the containers are also subject to the regulations.  In order to be sold in the US, a container has to be childproof, and it has to show a number called the Material Safety Data Sheet, or MSDS in the event that something goes wrong.  This is basically a quick rundown on what is in the product, and how to deal with a spill if it occurs.  Aerosol cans are not illegal, but they are subject to a lot of regulations, and the manufacturer is liable for any harm that they cause.