Pro tip:
Tin your wires. Assuming you're using stranded wire, make sure the wire is twisted tight and not unraveled. Touch the soldering iron to the wire, and the solder to the wire. The solder will flow up the wire, tinning it.
Make your mechanical connection first (put the wire
through the ear of the switch from the bottom and bend it back so it stays in place), then, touch the soldering iron to the wire AND the ear of the switch and touch the solder to the top the ear. It will melt and flow around the wire. You don't need much. You should be able to see the outline of the wire in the solder.
What he said. Also you may want to get one of these.
Soldering Heat Sink Clip Tool - RadioShack.com
You really don't need it but it helped me when I first started. Clip it to the ear on the switch. You will have to apply heat a little longer. The extra heat will go there instead of the switch. Well kind of.