By and large, people use these interchangeably. I used to be a stickler for using the correct version, but no one generally cares about the distinction and I've given up on (some of) my teenage rebel pedantry.
Pedantically, there is a distinction:
1) I don't think you should do that.
No thought (that you should do that) has occurred to me. I lack an opinion on the subject, either because I never considered it or I never made up my mind about it.
I am certain that I haven't thought about this.
2) I think you shouldn't do that.
I have thought to myself that you shouldn't do that. I have an opinion, i.e. a disapproving one.
I am uncertain whether my opinion is objectively correct.
Compare this to:
3) You shouldn't do that.
I am certain that this is objectively correct.
The reason it's so hard for us is because of "I don't think". It is very loosely used; and can be interpreted to either mean:
- "My mind is made up. I disagree."
- "I have not made up my mind about it."
Literally, only the latter is correct. But people have started using it for the former too.
This lack of distinction is causing the issue. If we avoid using "I don't know", it becomes much easier to see that these are not equivalent statements.
1) I'm not going to paint the house you bought.
2) I'm going to paint the house you didn't buy.
1) I shouted that OJ Simpson didn't do it.
2) I didn't shout that OJ Simpson did it.
1) I appreciate that you don't steal from me.
2) I don't appreciate that you steal from me.
You can't just shift the negation from one side to the other, it dramatically changes the meaning.
Why I think this is the case.
Euphemistic language and politeness.
"I think you shouldn't do that" is considered more confrontational that "I don't think you should do that".
The former is a blunt statement that you disagree with them. The latter, comparatively speaking, adds a softer implication of doubt rather than certain disagreement.
Consider a different example:
1) Please move your car.
2) Can you move your car please?
Both are a request. Both use "please". But the second sentence is still considered more polite, because it implicitly includes the option that the person is willing but unable to move their car. To translate:
1) Move your car
2) Move your car if possible.
Applying the same principle to your original example:
1) I don't think that [assertion].
I cannot confirm your assertion.
2) I think [negated assertion].
I disagree that your assertion is correct.
(1) allows for the option that you can't definitively answer whether or not it should be done. (2), however, is relatively certain about disagreeing with the initial stance.
Since (2) comes on stronger than (1), (1) is the more polite option and therefore valid to use if you want to be seen as a courteous human being.