Every time you press the brakes it draws a ton of power in these trucks- My lights dim a little bit at night and I documented that on here. When my CB is on (and others I have heard while offroading) whenever you press the brake you can here a noise like interference from an electrical motor running. I am pretty convinced the brake booster is drawing this power for all the ABS electronic aids to run.
Why did I tell you all that? Well...as others have stated, if your battery is low/old and terminals corroded it won't be able to supply this high amp demand and things will shut down. You could also have a bad alternator cable/ground or a loose connection.
Go to Autozone and have them test the battery.
Check the battery cables. If you can move them by hand, they are loose.
Check the grounds. Make sure they are tight and clean.
Check the wire connections at the ground ring terminals.
Check the power wire from the alternator going into the underhood fusebox.
Take the plastic cover off the alternator and check the connections.
Nobody can diagnose this problem over the internet- but we can help with your feedback!