I had to replace mine. If i remember right, the switch pushes forward out of the handle assembly. I think i recall removing the handle to do this. To actually get the switch out of it's housing there are 2 small tabs on the sides that need to be pushed in which allows you to remove the housing and expose the contacts.
Honestly, i ran without it for a long time and just applied both brakes at the same time. The switch design and contacts are really crap. I did end up replacing the entire thing this spring, for about $18 from our hosts. It was a 5 minute install, but does require opening the rats nest behind the headlamp.
one additional thought: The switch is open when the brake handle is at rest (plunger in). When you apply the brake, a spring pushed the switch into a closed position via a little spring in the back of the housing. A small plunger contacts the handle. You can watch it move as you press and release the handle.