Do a dweller's stats affect effectiveness of weapons
Agility and intelligence are probably a waste of time for dwellers who won't be exploring the wastes.
The only difference based on level is the dweller's total hit points, and the cost to revive them.
However, there is some thought that some of the SPECIAL stats affect combat. (see this question and the links within the answer). Strength may increase damage (though it's not certain this applies within the vault) and perception may increase aim/hit rate and thus overall damage.
In the wastes, success against a specific enemy type seems to be influenced by a specific stat (excluding endurance which seems to be a purely defensive stat).
Personally, I'm training the primary stat and luck for my stay-at-home dwellers, though I'm phasing out diners/gardens and water production as I introduce more Nuka Cola bottlers. As my vault improves I'll have an excess of workers, so I'll try to train everyone in endurance and possibly strength/perception. Wasteland explorers are being trained across all stats.