I've equipped several settlers with better guns and selected that gun as the one they use. But straight after a settlement attack, I noticed many of them had the same guns equipped they first arrived with. I guess I'll have to permanently take those guns out of their inventories.
If you're going to the trouble of arming your settlers with better guns to protect your settlement, it's a little bit annoying if they're reverting to the pea-shooters they first arrived with.