I try to use "_" instead of whitespace in filenames. Means no need to URI-encode them ever. If you have a space you don't know whether it's a tab or space. Or maybe two spaces. Also when you tell somebody what the file-name is, you don't prnounce spaces.
Depending on the font, when you have an underlined name (as is common for hyperlinks) you don’t know if it’s an underscore or a space either. And underscores are super wide in proportional fonts, so quite ugly typographically there. I therefore prefer to use dashes instead.
I agree dash is a better choice if the phrase is a "hyphenated compound". Such as "long-term". But if it is two words say in a proper noun like "New York", then dash might be a bit misleading.
Good nit. Still, when you pronounce the name in your head, or aloud, you quite automatically don't pronounce the space, but more likely would pronounce an underscore.