I only roll generation statistics when absolutely necessary, I find it cuts down on prep time.
Of course, prepping for a campaign is a lot of rolls and generating the scenario for each session is a goodly number too. So, I'd say I do roll HP prior to a play session almost all the time.
HP totals alter the difficulty challenge of an encounter leading to combat, so having them pre-rolled allows me to place potential encounters in areas where they are level appropriate.
Let's take a somewhat
big example for the amount of detail:
Bandits
20d10 appearing = 115 (with additional leaders, M-Us, etc. generated from that roll's total according to the MM).
Then generate HP for each, a 1d6, and put them into teams. This differs by each monster's organization. In this case, let's say 10 groups, giving us 11-12 members per group. Normally grouping would be by the number of leaders, but 10 divides easily for later territorial distribution, as you'll see.
Code:
6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 6 6 6
6 6 6 6 6 6 6 5 5 5
5 5 5 5 5 5 5 5 5 5
5 5 5 5 5 5 5 4 4 4
4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 3 3 3 3
3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 2 2 2 2 2
2 2 2 2 2 2 2 2 2 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1
Organization is based on average and leader INT, Alignment, leadership personnel, and other factors. The columns above each account for a average team with strong and weak members with each team ending up more or less at the same challenge level.
For Bandits 20% will be in the lair / bandit camp, while the others are out roaming. Their numbers, speed, the terrain type, and a bunch of other factors determines just how large the claimed territory they roam is. With 20% at home, we keep the bandit king and probably the two most powerful groups in the lair. Or maybe they cycle them out with the other 80% attempting to steal goods based on their goals and strategies (basically what makes them bandits).
Anyone entering the overall region of terrain which includes this territory falls victim to potential encounters according to pre-rolled Wandering Monster checks which I then put on a timeline. Some of the monsters on the table are the bandits. If a band of them are rolled on this regional table, I'll roll for one of the 8 which are afield randomly and outfit it with the rest of the supplies, background, and information they should have - more generation rolls or just taking note of what already is generated in connection with them (commensurate treasure).
If the players run into these guys, they become named NPCs. Even if the encounter is avoided by the PCs (perhaps the party gains surprise and sneaks away), they still have knowledge of the bandits faces in this band.
Named NPCs are tracked by me beyond your basic wandering monster roaming the lands. They retain their history of "on screen" action and accumulate more. If it is possible in a scenario they will come up again, I can generate backgrounds for them too - beyond what has already been generated (i.e. they are bandits, they know their roaming area, they know the orders their leaders gave, etc.)
It may seem like a lot of work, but once you know your system, it moves quickly and leads to some very interesting outcomes one might not have come up with on his or her own.
EDIT: You'll see I'm not rolling ability scores or really *anything* else until it becomes necessary to know those variable statistics. I do them at the table, if need be.