The sky is spoken of as if it were a building in which God stores the rain, and when God does not want it to rain he closes the door to the building. AT: "When you do not allow rain to fall from the skies" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here "turn from" is a metaphor for stopping doing it. AT: "stop committing their sins" or "stop acting sinfully" (See: [[rc://en/ta/man/translate/figs-metaphor]])