after a quick search it looks like it varies by location. for florida:
Sidewalk riding
(Section 316.2065( 10) and (11), F.S.)
When riding on a sidewalk or crosswalk, a bicyclist has all the rights and duties applicable to a pedestrian.
Comment: Sidewalks are not designed for bicycle speeds, but bicycle use is allowed except where prohibited by local ordinance (e.g. in the central business districts of many cities). Although a cyclist riding on a sidewalk has the rights and duties of a pedestrian, he is still a "bicycle rider" and his bicycle is still a "bicycle". Consequently, laws that pertain to required equipment and to carriage of passengers (see above) are still applicable.
Since a cyclist riding on a sidewalk does not have the duties (or rights) of a driver, he may ride in either direction. (However, it is safer to ride in the direction of traffic, since drivers do not expect cyclists to come from the other direction at driveways and crosswalks.) At a signalized intersection, he must obey the instructions of any applicable pedestrian control signal. That is, he may start to cross a roadway in a crosswalk only during a steady Walk phase, if one is displayed. If no pedestrian signal is provided, the cyclist may proceed in accordance with the signal indications for the parallel roadway traffic flow (Section 316.084, F.S.).
different state laws (probably tough to find town/city specifics anywhere)
http://www.bikeleague.org/action/bikelaws/state_laws.php