Fast answer
Choose Martina Franca when the inland stay needs a larger baroque old town, more evening depth, stronger civic landmarks, and a useful event-season check. Choose Locorotondo when the trip wants a smaller white-town base and a simpler atmospheric stay. Do not split nights just because both towns are close: compare old-town scale, dinner logistics, festival dates, car use, luggage movement, and how much nearby-town hopping the itinerary can carry.
If you only do one thing
For a first inland base, choose Martina Franca if the evening itself needs to feel substantial: baroque streets, San Martino, Piazza Roma, and a bigger town rhythm. Choose Locorotondo when the trip is already car-led and the priority is a smaller white-town stay rather than a deeper old-town evening.