It’s not a binary choice between planning and spontaneity so much as a spectrum, and there are advantages and disadvantages to writing in either way.
If you’ve got a very complex plot it can be easy to lose your way, even with planning. On the other hand, if you’ve got a simpler, single focus approach (such as Sir Edric) then spontaneity is easier to handle. Making stuff up as you go along can seem to save time (on planning) but it can also mean you spend more time redrafting (it’s important to get the storyline right first time, because correcting that takes ages. Improving writing quality or adding/cutting scenes is relatively simple, provided scene changes don’t alter the storyline).
The real advantage of spontaneity is that you can bring things out of left field, and instead of writing (even loosely) to a plan you’re writing in a more natural, less mechanical way.
Temple was the most spontaneous book I’ve ever written. I knew the premise and the final scene, and just about everything in between was made up as I went along (here and there I had vague ideas, but no more than that). This led to a not necessarily efficient or even use of time. Excepting one scene added later, I wrote chapter three in an afternoon. Chapter four took me something like a month (I massively rewrote it twice, completely changing the personality of one ‘guest’ character, and altering the identity of the second twice). That said, The Tower of Uz-Talrak remains one of my favourite chapters, and is proof that, even if you’re very dissatisfied with your initial attempt, redrafting can make a huge difference. If the basic storyline works, everything else can be polished after the first draft.
Journey to Altmortis was more planned. I had a brief outline of each chapter, using bold and underlining to ensure I had sufficient points of excitement and plot development (or both) throughout. Whilst I did deviate from the plan, particularly adding more scenes after the first draft, the finished story is very similar to the plan.
Kingdom Asunder (not yet released) is the first part of a trilogy, and presented a new challenge for me in that it has to work by itself, but also as part one of three. So, the end had to be both a conclusion, and open-ended enough for more story to occur. It reminded me of the first corner in an F1 race (you can’t win the race at the first corner, but you can definitely lose it).
I think it’s important not to nail everything down, and not to ignore a good idea that springs to mind because it wasn’t in The Master Plan. In Sir Edric’s Kingdom (not yet released), one chapter ended up being enormous, so I cut it into two. Likewise, one chapter’s pacing seemed a bit off, so I added a small scene which ended up including a reasonably significant character who made subsequent appearances in several chapters.
At the same time, knowing where you’re going enables you to write in such a way that can foreshadow future events, or exacerbate tragedy/comedy when you come to the climax. In short: it helps avoid the hell that is deus ex machina.
Temple was the most enjoyable book I’ve ever written, but the process was so slow and haphazard I can’t write like that for stories of any real size. A little planning, for me, does a lot to speed up the writing, and a plan can always be deviated from (or occasionally ignored). It’s very much a subjective matter, though, with no one rule that fits all writers.