Does it do it every time? or does it once and will be fine until you drive it some distance? You could have a bad/loose wheel bearing, bent rotor, or loose castle nut. These would cause the calipers to get opened up as you drive, and you'd have to overcome that before any brake pressure would be built.
If you have a soft pedal, it's probably not the brake switch, the brake switch just senses pressure built into the system, you're not building pressure to begin with, so you have an actual problems in the hydraulic system. Could really be anything in the system, but I'd check your fluid level first, check to make your pads are adjusted properly first, then bleed the brakes and see if that changes anything.
If it has lost fluid, you have a leak, if the fluid looks very dark or smells burnt, you've burnt the fluid and may need to change numerous components, but a complete fluid flush would be a place to start. Check all calipers for anything abnormal, open bleed screws, worn pads, binding, etc. If everything else checks out, then you're left with the master cylinder.