Carlos made great suggestions. I enjoyed all three, so it depends on what you want to see. The cathedral in Burgos has the crypt of El CID and his wife Dona Jimena, and is beautiful inside and out. There’s a nice overlook up the hill from the cathedral. Just outside of Burgos (a couple miles) is the Cartuja de Miraflores monastery. King John II of Castile and his wife are buried there. Burgos is probably the largest of the three cities and probably sees the most tourists. Leon sees plenty of tourists and worthy of a couple days visit. Leon has a nice cathedral and also a Gaudi designed building. It has a nice area for strolling, the old San Marcos convent, and Basilica de San Isodoro and pantheon. The smallest of the cities is Zamora which receives the least number of tourists. One can explore the city in day. It doesn’t have a major attraction but does have a small uninspiring castle, a cathedral, overlook, Roman bridge and ancient olive presses. The Camino de Santiago goes through both Burgos and Leon so you’d see plenty of pilgrims. Segovia is closer in towards Madrid. Its main draws are the Roman aqueduct and the Alcazar (rebuilt in the 1800s).
If you like castles, between Leon and Zamora is Valencia de Juan and its Castillo de Coyanza. It was closed when we drove by, but it’s pretty impressive looking. Then, heading east from Zamora is Tordesillas. The convent of Santa Clara was nice to tour. South of Tordesillas on the way back to Madrid is Mota Castle in Medina del Campo and the castle at Arevalo. As you get closer to Madrid, you could make a short stop at the walled town of Avila. It doesn’t take long to see and has little to offer, other than the wall. If you decided on Burgos and we’re headed to Madrid, there’s a nice castle at Penafiel and yet another at Manzanares el Real.
An alternative is the university town of Salamanca, but it might be to far west and south than you intend on going. It too has a nice cathedral, plaza mayor, and Roman bridge. Heading back to Madrid from there you could stop in Alba de Tormes to see the tomb and relics (believe heart and finger) of Saint Teresa of Avila in the Basilica of Saint Teresa. Then you make the short stop in Avila before arriving at Madrid.