Is it generally better to have all legendaries? My shotgun is the fire effect which I'm keeping because of human enemies. I had a "purple effect" gun but disposed of it due to low accuracy in favour of a slightly less wobbly assault rifle.
for the same level, legendaries are better, but that doesnt mean a lv10 legendary is going to be better than a lv20 common (or therebouts), exceptions for anything that has ammo regen as you can use it to recharge ammo for a more effective gun.
generally the way to figure out the "best" gun you have in your inventory is the not so scientific shoot stuff and see which you like best for killing things.
the style, and how you spec your character comes into it as well, for example with gaige i found using torque/jakobs shotguns worked best as a low ammo capacity=more reloads=more anarchy stacks=more damage
in each game it seems of all the elemental types one seems to be preferable, in bl1 i found it wasnt that important, bl2 i found acid weapons to be the best "jack of all trades" weaponry wheras in bltps it seems to be all shock damage that works the best. of course that's mainly due to the characters, spec, and way i play