The reason a socket wrench is preferable is because the switch is usually in a tight spot, and a ratchet gives you more leverage and control than a simple open-end or box-end wrench. If it's particularly stubborn, a breaker bar on your socket wrench might be necessary.
Avoid using an adjustable wrench as these can round off the corners of the switch, making future removal even harder. If you have a really old or corroded switch, you might need a penetrating oil (like PB Blaster) to help break it free before attempting removal.