Each weapon in the game has it's size which determines if the weapon can be equipped along side with a Shield. This affects ranged and melee weapons in the same way. If a shield is equipped any ranged and melee weapons that do not meet the criteria will automatically become unequipped.
Most shields, except for a defense bonus also provide additional elemental bonuses (most commonly to fire, cold and nature elements without enchantments. Larger shields make it increasingly more difficult to succeed in a dodge - which means that your defense bonus is more likely to be needed when equipping one.