Car rental: You can book as soon as you're pretty sure of your dates. Most rental reservations (even those prepaid through AutoEurope) can be cancelled or changed up to a couple of days ahead with no penalty. So booking ahead is low--risk but waiting might mean that you have to settle for a different car type than what you wanted, or even cars selling out in high season.
Train tickets: Short-distance tickets may not have much or any advance-purchase discount. If there are discounts, some may be available as late as 24 hours ahead. Book both legs of a roundtrip together, if making a roundtrip. You can see rate variations at www.nationalrail.co.uk. Trains don't require seat assignments and therefore cannot sell out.
Castles: Rick's Scotland guidebook indicates that the only reason to book online for your first two castles is to avoid a ticket line in person in high season (not because tickets will sell out). Eilean Donan tickets are sold in the local tourist information office.
Ferry: If you're taking the ferry instead of the bridge, p. 291 of Rick's book suggests that, "In summer, it's smart to reserve a spot on the ferry the day before, either online or by phone."