There is a software called Articy draft which is designed for non-linear storytelling, and which should by know export everything in xml. It's a tightly packed solution, however its ergonomy isn't the greatest.
For more linear stories, a simple writing tool works pretty well. Celtx is a reference as far as scenario-writing is concerned, but Word, LibreOffice or any equivalent works just as well.
And based on what Chris said, I'd add that excel is great for anything you need to retrieve at runtime in your game : dialogs, cinematic elements, reading generated levels... it may seem weird but you can do a lot with it.