Strictly speaking of medieval European battle, during the era of the longsword.
During that time period? The main differentiator will be how well armoured you are; if you could afford harness, a shield is redundant defensively since the only weapons that realistically have a chance of wounding you are polearms, making the longsword a far more effective sidearm. It has more reach, more killing power against lightly armoured foes and frequently better designed to pierce mail (see Ewart Oakeshott's sword typlologies: many longswords, especially of the latter period tend to have narrower, more thrust focused blade geometry) as well as being a better grappling aid.
In lighter armour (mail/gambeson), a shield at the very least will provide significant protection against missile attacks, as well as reducing the openings your openings can easily reach; however to fight a man in harness you'll still want a polearm to stand a good chance of inflicting any sort of serious injury. For walking around, if you were using sword & shield, it'd be a buckler compared to one of the larger designs, and in an unarmoured/low-armoured conflict, sword & buckler v longsword really comes down to which you are better with
So the TL:DR is it really comes down to what you have, and what you expect to be fighting against as to which one is the better choice.