I normally outfit my character with three weapons.
10mm pistol converted over to a .45 for some extra punch. Add in a poisoner's mod for fun. The .45 round hit harder than the 10mm and .45 is easy to find and you can buy it in lots of 200 plus from most merchants. With a Large quick eject magazine I get 22 shots with the .45 before having to reload. That's enough to drop most mobs.
Laser pistol fully upgraded and tuned for short ranged fights indoors. I add in a Irradiated mod for 50 points of radiation damage each shot. I am also fond of the Never Ending mod for the laser pistol as well.
I switch to which ever pistol I have the most ammo for at the time. Or, which ever one fits the fight I'm in at the moment.
My third weapon is a rifle for the times I need a long range shot and a pistol just won't cut it. Right now my favorites are a fully upgraded Laser Rifle with the sniper barrel or a Gauss Rifle. I have not settled on favorite Legendary mod yet.
I'm still experimenting with the sniper weapon so my favorite is probably going to change as I work my way through the different types of rifles.