If you want to take a Sintra tour from Lisbon, you need to book this in advance, especially in summer. However, if you're visiting Sintra independently, it's up to you. It's far better to book the tickets to the palaces you want to visit online in advance to avoid long queues, but it's not a requirement.