1. We can turn off the water when we are not using it.

1-1. We can turn off the water when we do not use it.

2. We can turn off the water when we are brushing teeth.

2-1. We can turn off the water when we do not brush teeth.
====================
Which ones are grammatical? Do we have to use the ing form?

1 and 2 are correct. The gerund form is useful here. 1-1 is awkward. 2-1 makes no sense.

Both sentences 1 and 1-1 are grammatically correct and have the same meaning. In these sentences, "not using" and "do not use" are both present participial phrases that indicate the activity of not consuming or utilizing water.

Similarly, both sentences 2 and 2-1 are also grammatically correct and have the same meaning. In these sentences, "brushing teeth" and "do not brush teeth" are both gerund phrases that indicate the activity of brushing one's teeth.

Regarding your question about using the "-ing" form, it is common in English to use the present participle ("-ing" form) in phrases that describe ongoing actions or activities. However, in some cases, using the base form of the verb (infinitive form without "to") is also acceptable and conveys the same meaning.

So, in conclusion, both forms (the "-ing" form and the base form) can be used interchangeably in these sentences without any change in meaning or grammaticality.