In the TOS episode "A Piece of the Action" the main phasers of Kirk's Enterprise fire on stun setting and knock out people in several square blocks of city on the planet Iota below the ship.
Does the Enterprise D retain that useful feature?
In the first TNG episode "Encounter at Farpoint":
PICARD: Thank you. That was the missing part. Lieutenant Yar, rig main phaser banks to deliver an energy beam.
TASHA: Aye, sir.
RIKER: You're right, Captain. It has to be conceivable that somewhere in this galaxy there could exist creatures able to convert energy into matter.
PICARD: And into specific patterns of matter, just as our transporters do.
And after about 8 more lines of dialog:
TASHA: Energy beam ready, sir.
PICARD: Lock it in on Farpoint Station.
Q: I see now it was too simple a puzzle. Generosity has always been my weakness.
PICARD: Let it have whatever it can absorb. Energise.
So it takes Lieutenant Yar just a minute or two to rig the phaser banks to deliver an energy beam which doesn't destroy the alien space jellyfish but gives it enough energy to escape from Bandi bonadage, transform itself, and rise up into space to rejoin its companion.
Since that was done so fast, I think that switching to phasers to transmitt energy in forms and amounts which are harmless to (at least some) lifeforms is a built in feature of the phaser design and not something which Yar had to improvise.
So what type of energy was in the beam and how intense was it? I suspect that Yar sent a very faint and harmless beam at first and gradually increased the power as her sensors indicated how the creature was reacting.
Eventually she might have raised the power to a level which was still safe for the creature but which might have instantly killed any humanoid struck by it. Or maybe the energy beam would have been safe for a humanoid even at the highest setting Yar raised it to.
But I think that as Yar raised the power of the energy beam the intensity of energy striking the surface should have reached, and probably passed and exceeded, the energy level needed for a phaser stun setting.
So it seems very probable that phaser banks of the Enterprise could be set to deliver a power level and energy intensity suitable for a stun setting. Whether they could deliver the right forms of energy to stun - instead of having no effect or killing - is not specified.
Off hand it seems like a very stupid idea for Starfleet to abandon a stun setting for starship phasers, but naval designers often made what seems like stupid decisions.