Is it ever correct to have a space before a question or exclamation mark?
In English, it is always an error. There should be no space between a sentence and its ending punctuation, whether that's a period, a question mark, or an exclamation mark. There should also be no space before a colon, semicolon, or comma. The only ending punctuation mark that sometimes needs to be preceded by a space is a dash.
I see this error most often with people who never really learned to type. In handwriting, spacing is more, um, negotiable and subject to interpretation.
People have mentioned in the comments that, yes, in the past, a small (non-breaking) space was inserted before an ! and a ? These must never start a new line. The space is also a small space, very clearly much more than the space between letters of a word, but much less than a sentence-ending space.
See, for example, this:
And:
From an 1899 edition of Ralph T. H. Griffith's The Texts of The White Yajurveda. (Link)
This is by no means current practice, as Marthaª's answer explains and I suppose the answer to the question 'is it ever correct ...' is no. But was it ever correct? Yes, very much so.