No, spiritual weapon cannot be used to make opportunity attacks
Rules as Written
Spell do only what they say they do in 5e. Note that this spell does not summon an ordinary weapon that you can use in whatever way you would use one. Instead, it creates a spectral weapon whose uses are clearly defined by the spell text.
The spell describes the only way to attack with the weapon after the initial casting as:
As a bonus action on your turn, you can move the weapon up to 20 feet and repeat the attack against a creature within 5 feet of it.
There is no mention of any way to use the weapon to attack using a reaction for an opportunity attack, thus it simply does not have the ability to be used in this way.1
Rules as Intended
Jeremy Crawford agrees and says that spiritual weapon being unable to make opportunity attacks is completely intended in this Tweet:
Q: [D]oes spiritual weapon threaten the square it's in for
attacks of opportunity?
Crawford: The spell's description would say if the spiritual weapon made opportunity attacks. It intentionally doesn't.
Allowing this would make the spell more powerful
Action economy
As written, the weapon can only make an attack as a bonus action on your turn. By opening up the option to use the spell as a reaction you have increased its utility. Firstly, by allowing this it can now be used to attack outside of the caster's turn.
Secondly, it would then be allowed to be used as a reaction instead of a bonus action. Reactions and bonus actions are different in their uses and restrictions. Opening up the option here might allow a character to save their bonus actions for other class abilities by using this spell as a reaction for example.
Thus, by giving the spell more ways to use and and more utility you increase the power of the spell.
Area control
Allowing this weapon to be counted as an extension of the caster's reach provides a doubling of the area that the spellcaster threatens and doubles their opportunities to provoke OAs.
Additionally, the weapon would be very effective at threatening OAs since it cannot be attacked. Thus it can move freely into melee territory and lock down enemies with no risk to the weapon itself. This is much more powerful than another creature that can be hit positioning itself within enemy melee range. The caster doesn't even have to give up the ability to make OAs from their space to do this.
From a pragmatic standpoint this also would mean that two separate reaches would have to be tracked throughout the battle for that one character which could get unwieldy and potentially could bog down battle a bit.
Up to the DM
As always, even with these concerns the DM can allow it. Just note that the spell will be more powerful and that it is going to go against the intent and RAW for the spell.
1- Having the Warcaster feat would also not change this as the feat only allows for casting a new spell in place of an opportunity attack (not using a currently active spell to make an OA) and also it only works for spells with a casting time of 1 action (spiritual weapon is a bonus action spell).