Although many claim that it is not legal, it is. The practice was banned starting in 1967, but then allowed in 1969. See Kiplinger's Magazine, January 1974, last paragraph.
It is, however, illegal to melt U.S. pennies and nickels (silver 'war' nickels can be melted). See the 120-Day Ruling Press Release and Final Ruling Press Release, and recent/current law at the U.S. Mint website (which also confirms that melting silver coins was illegal from 1967-1969). The full law can be found at gpoaccess.gov.
The reasons for these are simple. There are no longer any silver coins in circulation (except as people occasionally re-introduce them, usually by mistake), so melting them has no effect on day-to-day transactions. However, melting pennies and nickels removes them from circulation, so it would harm the U.S. economy for people to melt them.