Rothenburg is fairly small, so one day is really enough time to see the major sites and get a feel for the town. If youre making Rothenburg a stop as part of a longer trip, one or at most two nights would be plenty of time.
How long to spend in Rothenburg?
This is a matter of preference and certainly you can walk around the town and take in some good views in a couple of hours. You can get a good overview of the town during a day trip. However, I would recommend at least one day (preferably two) and one night to really allow yourself enough time to explore Rothenburg.
How many days in Rothenburg ob der Tauber?
The medieval town is part of the famous Romantic Road and is entirely fortified and quite small, so if youre wondering how much time you need to explore, two days and one night are totally sufficient.