Stayed three nights. Most others in our hotel spent 1-2. I am happy I stayed three nights so my time was relaxed and not rushed.
There is a lot to do and three nights allows you to do it all, including take a day trip to Raquira via bus. I would love to come back to Villa de Leyva and spend a week or two relaxing and wandering the town.