1. If the weather permits, I'll go camping.

2. If weather permits, I'll go camping.

3. The weather permitting, I'll go camping.

4. Weather permitting, I'll go camping.
---------------
Do we have to use 'the' or not in the sentences? Which ones are gramatically correct?

All are correct -- but, you're right, you don't need "the" as in #3.