What kind of fuel mileage are you getting and how much fuel did you pump into the tank? It will also depend on the size of your fuel tank. The difference between how much you pumped in and your fuel tank capacity will give you the gallons left. Your average mpg will give you and idea how much range you'll have after the light comes on.
For example, if you are averaging 18 mpg and you have 2 gallons left. You'll have somewhere around 36 miles before the engine shuts off from fuel starvation.
Of course, that is based on a perfect world where fuel isn't splashing around from bumps, hills, and turns. And that is assuming the entire fuel quantity in the tank can be pumped out of the tank and into the engine. Vehicle fuel tanks typically have some amount of fuel that is unusable. So, you might not want to push that limit without some fuel cans in the bed of the truck. Me personally, I prefer to hit the closest gas station after the light comes on or preplan to make sure I have enough fuel to not get stranded in the middle of no where.
Finally, your fuel pump is cooled by the fuel running through it and it uses the fuel in the tank as a heat sink. The less fuel there is, the less cooling happens. It's not going to kill your pump right away or make your vehicle explode but it isn't great for the fuel pump either. And it increases the chances of sucking up any water and/or junk that may have found it's way into your tank one way or another.