Hello. As far as grammar rules go, I do not know the exact answer but I can explain a bit.
"It depends on weather." sounds strange and incomplete, "weather" needs to be definite in this case.
There are similar constructs to this, such as "It depends on the situation"
However there is another scenario using the word "whether" which is pronounced the exact same way as "weather." "Whether" is a conditional and you do not use "the" before it.
-"Do you want to go to the park tomorrow?"
-"That depends on whether or not it rains tomorrow, I don't want to go if its rainig."
I hope this helps.