You should expand your contractions and keep track of what the word "not" is modifying.
- You don't need to play => You do not need to play (here "not" modifies need)
- You need to not play (Here "not" modifies play)
- You need not play (Here "not" modifies need)
- You needn't play => You need not play (same as #3)
1, 3, and 4 all mean "You are not required to play", whereas #2 means "You are prohibited from playing".
"need not" has the same meaning as "do not need" and the latter is more commonly used. Nobody would say #2 unless they meant to emphases that you need to avoid playing, and in that case they'd likely stress the word "not":
You need to NOT play (because if you play your head injury will come back and you'll be brain-damaged).
Even though #2 is technically correct people are far more likely to say
You must not play
to express the same prohibition.
Edit: #5, which was added, says
You need not to play.
This sentence is not grammatical to me as it stands.