On 3 March 1819 an act of Congress formally placed the responsibility for assigning names to the Navy's ships in the hands of the Secretary of the Navy, a prerogative which he still exercises. This act stated that "all of the ships, of the Navy of the United States, now building, or hereafter to be built, shall be named by the Secretary of the Navy, under the direction of the President of the United States, according to the following rule, to wit:
* those of the first class shall be called after the States of this Union;
* those of the second class after the rivers;
* and those of the third class after the principal cities and towns;
* taking care that no two vessels of the navy shall bear the same name.
See full article at http://usmilitary.about.com/od/navy/l/blshipname.htm