The old city center of Haarlem is on walking distance from the central train station. So if you are visiting from Amsterdam, or other cities, you do not need additional transportation to visit the center of Haarlem.
If you have only one day, we would recommend renting a bike to see more of Haarlem. Also with a bike you could make a trip to the beach of Zandvoort or Bloemendaal.
Below some handy information for you as a visitor of Haarlem.