Everything in the game is a manner of balancing your advantages vs. those of your opponent and keeping the scale in your favor. Some general rules:
* If you are the only side that has enough grouped models to volley with, then do it for as long as you can.
* If you both have volley capabilities but you have a range advantage or superior terrain coverage / LoS / Defense, then it's nearly as good as #1
* If you both are equal in #2, then consider similar questions for direct bow fire. If justified, consider 1/2 moves to direct fire range while keeping up volley shots. If not justified then just full rush to direct fire range.
* If you are outclassed / outnumbered / our maneuvered for both volley and direct fire then forget it and get into combat asap. Perhaps keep some archers active on harassment, cover fire, etc.
* If you do volley, try to focus on low defense models (Cav are excellent targets for this).
In SBG there are very few hard rules of what is best (I won't get into my gripe about how some of this is lost in WotR...oh wait...I just did
). My exact same Elf army list may face a Goblin horde in one game that just has so many volley dice being rolled that it doesn't pay to try to out volley them, but if I can get into direct fire range, while staying only in their volley fire range, then I'll wear them down fast. But those exact same lists may deploy on another table in such a way that the Goblins can't volley effectively and are at the mercy of even the random 6's of volley fire. In such situations I would happily sit back and take my chances on a couple 6's for a turn or two if the scenario allowed.
Volley is often a factor of numbers for increased odds. Twelve-model volleys will generally be more effective than 10-model, just because of the odds. Generic, bad-shot Goblin / Orc armies can often out-volley Elves and Dwarves simply because they are so cheap they can have several more models lined up to volley and score a few extra 6's, though defense factors are always critical as well. If your Heroes have bows (as most of my Elf Heroes or Captains do) then use them to increase your odds.