Style guides vary on this point. The Associated Press style uses spaces around dashes, while the Chicago Manual of Style does not. Choose a style and use it consistently.