This is usually a master cylinder problem. Get under the car and look for oily residue drip lines on the inside of the tires meaning a busted wheel cylinder. A leaking cyl drains the fluid out of the master and allows air to enter. If the master lost fluid and got air in it it may still be good but you have to do all the steps needed to restore it to service after you rebuild or replace the leaking wheel cyclinders.
Worn master cylinder.
Try to pump it to build up the pressure.
Get it diagnosed and repaired.
it is usually a defective brake light switch which is attached to the break pedal usuall up under the dash.
It is above the brake pedal not under it. Follow the brake pedal bracket all the way up and you will see the brake pedal switch.
If you can pump the brake pedal and it firms up and then while holding pressure on it the pedal slowly goes to the floor the master cylinder is bad. It may be worn to the point that it will not build any pressure. If you pump it and it holds then it is probably air in the line. Very hard brake pedal is usually the vacuum booster.
Try bleeding your brakes. If there is air in the system it can give a spongy feeling to your brake pedal and require you to pump your brakes and/or put your brake pedal to the floor.
Have a helper pump the brake pedal several times then hold it down. Loosen the bleeder valve at one wheel and let air and fluid out until the pedal reaches the floor. Close the valve and pump the pedal up again. Repeat the process until there is no air in the fluid, then move to the next wheel.
when your brake pedal moves up and down when you press the pedal ,usually it is a warped brake rotor or a loose bearing on one or both brake rotors Warped front disk brake rotors.
Under the brake pedal is a brake light switch that when you press the pedal it hits it and makes your lights come on..sometimes when they get weak the pedal depresses them simply from the weight of the pedal and they stay on..Have a friend get inside the truck and pull UP on the brake pedal as you look at the lights..if the brake lights go off when they pull up on it..then it is that switch under the brake pedal
Spongy brake pedal that can be pumped up to more solid pedal Brake fluid system has been opened for repair or part replacement Spongy brake pedal that can be pumped up to more solid pedal Brake fluid system has been opened for repair or part replacement
check the switch that is located on the brake pedal arm. sounds like it is out of adjustment. pull pedal up and see if switch is still engaged. not sure if this switch slides back and forth or screws in and out. back it off till lights go out with no pressure on pedal.