Since we were scheduled two days in Edinburgh, I did both Stirling Castle and Edinburgh Castle. Both were great excursions. If I could only choose one, I would choose Edinburgh which also allows you to see some of the other sites in the city.
We ended up with another day in Edinburgh due to weather. Since we were docked in Leith, we spent that day touring the Royal Yacht, which was right next to the ship. Great choice, and would have been doable along with another excursion that day. The Royal Yacht is self guided and can be done in about 2 hours.