Here's how it functions:
* It acts as the object of the preposition "on". Prepositions need objects to complete their meaning, and in this case, the preposition "on" needs to know *what* your health depends on.
* It functions as a noun. The entire clause "how you take care of it" is a noun phrase that tells us the condition your health depends on.
Here's how the sentence works without the noun clause:
* Your health depends on something.
The noun clause "how you take care of it" fills in the gap and provides that "something."