Kotor is a small town, which makes the stay-length decision more straightforward than in a larger city. The main question is not whether you can fill the time -- it is whether the experience justifies a second or third night given the cost of staying in one of Montenegro's more expensive destinations.
One night: when it works and when it does not
One night in Kotor works in a specific scenario: you are passing through Montenegro on a longer route, Kotor is not the main destination but a scenic stop, and you arrive in the late afternoon. In that case, one evening and one morning in the old town gives you the essential Kotor experience -- the walk along the walls, dinner near the square, the morning quiet before the day-trippers arrive.
One night does not work well if you arrive mid-morning and leave the following mid-morning. You will hit the worst of the crowds and have the least atmospheric version of the place. The timing of arrival matters a lot in Kotor.
Two nights: the recommended stay
Two nights is the stay length that covers Kotor properly without overstaying what the town can sustain. You get two evenings (which are the best part of Kotor) and one full day to use without pressure.
A good two-night schedule: arrive on day one in the late afternoon, walk the old town, find dinner. Day two: climb the fortress walls in the morning (the path starts from inside the old town and takes about 45 minutes to reach the top -- 8 EUR entry, extraordinary views). Afternoon at your own pace -- the old town is small enough that you will have seen the core of it by now, so the afternoon can be genuinely slow. Second evening is the best evening in Kotor -- you know where to go, you are not rushing, and the atmosphere of the old town after dark is one of the most memorable things in the region.
Three nights: when it makes sense
Three nights makes sense when you want to use Kotor as a base for exploring the wider Bay of Kotor. The village of Perast, about 12 kilometers north of Kotor, is one of the most beautiful spots in Montenegro -- a tiny baroque town on the bay with two small islands just offshore. The boat to the Our Lady of the Rocks island takes about 5 minutes and costs a few euros. Perast is most easily visited by taxi (about 15 to 20 EUR one way) or rental car.
Budva is also about 30 minutes south and makes a natural day trip if you want beach access without basing yourself there. Three nights in Kotor with a Perast day and a Budva day is a very complete Montenegro short trip.
The fortress climb
The fortress above Kotor is the single most worthwhile activity and the one that most shapes how long people feel they need in the town. The climb takes 45 minutes to an hour each way and involves about 1,350 steps. Start early (before 9am if possible) to avoid the midday heat and the crowds. The view from the top -- the bay, the old town directly below, the mountains behind -- is the image that most people remember from Kotor longer than anything else.
What about Budva as a base instead?
Some travelers base themselves in Budva and do Kotor as a day trip. The bus between them takes about 30 to 45 minutes and costs around 2 EUR. This works well if your priorities are beach access and lower accommodation costs. Kotor as a day trip from Budva gives you enough time for the old town and the fortress climb. The trade-off is that you miss the evening atmosphere in Kotor, which is genuinely one of its best features.