You can just assume that they're set to stun by default, and when they say "set phasers to stun!" they're just reminding the crew and audience that they're not using deadly force.
By default, they're probably set to "off", and probably any given "stun" (several levels eventually got defined, in canon, from a few minutes knocked out to a number of hours) comes one or more clicks prior to "kill" (again, several levels, from collapsing dead but 'untouched' through singed effects and on qgain into full disintegration like they were never there when they reshot the next part of the scene) with thermal effects (heating rocks), anti-materielle (destroying walls) and mining (digging rock) probably featuring both intensity and focus adjustments to properly achieve (the plot/series/model of prop might try to address this, or keep it as wibbly-wobbly as the Sonic Screwdriver). Also, some aliens (notably changelings) need higher-than-most-powerful-human-stun setting to get any stun effect at all, kill-effects also being notably higher than 'standard'.
As to being
told to set them to stun. That's just a form of proper military communication. The lead character is positively telling the redshirts/etc that this
isn't an Extreme Prejudice away-mission, that if you
have to shoot first you still want to be able to ask questions later, and thus no misunderstanding occurs that undermines the duty commander's intentions.
(
We know that the natives are probably going to fatally shoot (or zap, perforate, dissolve, swallow, crush, etc) anybody wearing red that isn't faking a Scottish accent, or yellow without a fancy Alice Band over their eyes/being an Android/being Klingon/RIP Tasha, but
our guys/gals/etc are the Good Guys/Gals/Etc and should be following orders they know to be in line with Prime Directive, diplomatic or just good investigational procedure...)