I try to edit my loadouts so my snipers can switch to pistols as primary weapons, and still carry their rifles.
This is important when entering buildings, where a pistol is better for the tight spaces. After all, in the starting scenario, there are aliens in the closest buildings.
This is an interesting and well-founded approach, although I find that pistols have a harder time taking down the tougher aliens such as Ortnoks, who can at times absorb a disturbing number of rounds. It's definitely true that maneuverability is important in tight spaces, but it's my opinion that the SMG is best for this. It's still small, although a 2-handed weapon, and it can auto-fire far better than a pistol. It needs fewer reloads, and packs way more punch. Indeed, I believe the SMG was designed for this, and this is why many top-level special forces and SWAT teams use various SMGs like the MP5. However, I do equip my sniper and grenadier with pistols, just as you say, for the same reason: a smart and clearly carefully considered tactic.
As for my general loadout, it goes thus:
1 sniper, armed with sidearm for close-quarters fighting
1 heavy machine gunner: for general heavy fire support
1 grenadier: for indirect fire and nest-clearing, armed with sidearm for close fighting
1 rifleman armed with the assault rifle, which has a better range than the SMG.
3 "stormtroopers": armed with SMGs, and tend to be the ones used to storm buildings and rooms
1 medic: armed also with SMG and medi-kit. Tends to stay back and middle, so she can branch out for medical assistance.
I used to use the shotgun for my primary stormtrooper, but found the shotgun really lacking at mid-range fighting, so I switched to the SMG. I also have shied away from too many assault rifles, mostly because I find that assault-rifle armed agents tend to reaction-fire with one shot (even when set to full-auto on reaction fire). I also used the flamethrower for close storming, but found the weapon wholly useless except at close-range. I'd like to develop a good, specific use for the flamethrower, such as against alien bunkers (the reason for which flamethrowers were originally designed), but a small special-forces team needs more versatility than is afforded by the flamethrower.
The sniper is really the chess-queen of the battlefield. With a good sniper post and excellent team discipline, the player can really punish the aliens with the sniper, which is exactly what snipers are intended and meant to do. A good sniper can win a mission, just as a real situation, and is a must to almost any mission where there are sizable distances to cover. This use of the sniper in UFO:AI is what makes this game so excellent. It really rewards the player for developed a sophisticated practice, not just a standard loadout. In the XCOM series, there was really little advantage in using snipers, although I still did. This game really takes advantage of the diversity of weapons, while limiting the sniper realistically with such issues as magazine load and fire rate. My sniper is almost always escorted by another agent with better close-in fighting abilities.
I really want to develop a doctrine for melee fighting. Generally, I avoid melee fighting because it usually happens as a result of bad fire-arc control and poor planning. However, I would like to eventually develop a well-tested doctrine for equipment and tactics for bladed kills. Currently, all agents carry a plasma blade, the one-shot death knife, but never has an alien come even remotely close enough to necessitate using one. My general plan is to cover all arcs of fire and approach, then win the firefight through superior planning and aim. When the aliens stop assaulting and hide, then it's time for very careful SWAT-style assault: mutual cover, watching all arcs, flashbang/frag a room, then storm. More than once has an alien popped out of a room at close range to try and take out my agents, only to find 2-4 agents stacked up with various firing angles on that very door, followed by a hail of bullets.
That kind of tension, and the way the game rewards the meticulous player, is what makes UFO:AI not just a game, but an experience. Like I've said in other posts, this kind of game teaches a real skill, one of planning and management. It's chess, but far more exciting!