Sometimes, when it comes to deciding between using the word whether and employing the word if, the correct choice is obvious: “I don’t know if to turn the oven knob left or right” is obviously wrong, but the almost-identical statement “I don’t know if I should turn the oven knob left or right” is acceptable. However, because if implies probability, and whether indicates a choice between alternatives, in formal writing, the latter is more appropriate.
Similarly, “I don’t remember if I turned the oven off” is correct, but because “I don’t remember whether I turned the oven off” more clearly expresses that two alternatives exist, it is better in formal contexts.
“Turn the oven off if you are leaving” is a conditional sentence — it involves probability, not choice — and therefore if is correct. But “Turn the oven off whether or not you are leaving” conveys two alternatives, so whether is better. Note also the insertion of the phrase “or not” into the sentence: When the sense of whether is “regardless of the possible alternatives,” include the phrase.
However, in such constructions as “I don’t remember whether I turned the oven off,” because whether already has a sense of “yes or no,” “or not” is redundant.
The phrase “as to whether” to mean “about whether,” as in “I am unclear as to whether a decision has been made,” is correct, but it’s an unnecessary formality; “about whether” will do. The phrase is also somewhat pedantic in constructions such as “The question as to whether it will do any good hasn’t been answered.” Simplify to “Whether it will do any good hasn’t been determined.”
When whether follows a noun such as decision, issue, or question, it should do just that, without the word of intervening, if the phrase appears in a sentence such as “They will make a decision whether we’re there or not.” (“Or not” is necessary here because the sense of whether is “regardless.”) But if the sentence structure is something like “It’s an issue of whether they’re qualified” (here, “or not” is superfluous), of is integral.