This is a very good question! It's also very hard to answer.
Grammar matters in every language. It's the way that you put words together, and if you don't use grammar that every speaker knows, then no one will understand what you are saying!
For example, if you wanted to tell someone, in English, that you were going to the store in an hour, if you said:
"Store I'm hour in going."
Obviously, no one would understand what you meant.
You have to know grammar to speak a language. *But* there are many ways you can learn the grammar of a language. Not all of them include learning complicated grammar terms or writing sentences over and over and over. All children, for example, learn the grammar of their native language by listening to others speak and by reading!
I don't believe in strictly teaching grammar. I think that knowing the proper grammar rules are important, and teaching those to students are important. But there is a right way to teach it, and a wrong way. :)