An on/off switch on a desk lamp. A single interface controls both on and off. Since it is the only option, it is obvious by process of elimination. There is also strong and immediate user feedback. “Light off! Light on!” is hard to miss.
Elements of an interface should only perform one function. You can consider a toggle as only “one” function: ‘Off’ is only available when 'On’ and vice versa.
Toggle is less obvious when many interface elements are present, so strong feedback from the action (like 'light on/light off’) becomes even more important.