In Spanish are mandatory. Since in Spanish the verb and the subject doesn't change places in a question, the question marks and the exclamation marks MUST be placed at the beginning and at the end of the phrase.
Examples:
Affirmation or statement : Estas en casa.
Question: ¿Estás en casa?
When the reader sees the first question marks, he knows that a question begins, and he (or she) makes the right intonation.