As pure coincidence, I'm reading a 3.5 adventure (The Siege of Ebonring Keep, for Arcana Unearthed) where I saw this exact encounter. Weird how things like this happen. Now, I'm not saying this is the only way to do it, but what they suggest is:
80 feet out, the PCs get a Spot check at DC 25. For every +2 over the DC, add 10 feet to distance. So, a roll of 28 means that they spot the ambush 90 feet away.
Failing that, they get to try again at 40 feet, this time the PC roll is opposed by the bandit's Hide throw. The bandits have constructed blinds on the sides of the road to hide their ambush, so the bandit's get a +5 circumstance bonus.
If the PCs fail that, then they will be totally surprised.
Now, the question here is: Who should roll the spot check for the PCs? The leader of the group? The character leading the party? The highest Spot among the group? Take 10 with the highest among the group? The highest of the group but then add +2 for everyone else in the group (using the Aid Another rule)?
How do you get away with fairly rolling once for the entire group?