Before the Scoobies went down into the hellmouth to kill the ubervamp army, in the last episodes, why didn't Willow use the ball of sunshine spell? It's very hard to kill the Uber Vamps, holy water doesn't work and staking them doesn't work unless you're super strong, so why didn't she use her sunlight spell? Not once during any episode did she try that spell on them. It could have saved a lot of lives and potential slayers.
The last time we see the Simulated Sunlight spell, Willow is trying to get it to work. Suffice to say, she's unsuccessful and her attempts result in the release of an extremely dangerous opponent, Olaf the baby eating and damn near invulnerable Troll.
There's no indication that she was ever able to get it to work properly (at least within the main TV series, see below) and given its potential for failure and the possibility it could release an even worse baddie than the vampires that Buffy is fighting, it's pretty reasonable to assume that she either stopped working on it because it was more trouble than it was worth or just plain couldn't get it do what it was supposed to.
Interestingly, in the (non-canon) video game Chaos Bleeds, the 'sun spell' is one of Willow's standard weapons again vampires and can simply be cast rather than created using any of the ingredients seen in the show.
Asides from the sunlight spell being unreliable (mentioned in the comments), it would only hurt the vampires present - not those still down in the Hellmouth - and likely blind everyone else. So Willow would have to have a load of the spells ready and throw them down like grenades. Asides from that, using the spell would mean the climax to BTVS wouldn’t be in line with the overarching theme of the series.