I'm visiting Rome in September with my wife who wears a head scarf.
Are there any rules or customs we should be aware of?
In short: you have nothing to worry about.
The only Italian law which is somehow related to your case is for public security, it prohibits wearing or doing things that make a face difficult to be recognised if there is not a rightful reason to do it. So:
And, to be honest, many Italian women wear an headscarf while in Rome both to show respect when entering churches and to protect themselves from the sun, so it's not something unseen either.
Law references (but still, I'm not a lawyer)
Testo unico della legge di pubblica sicurezza, articolo 85, decreto regio 18 giugno 1931, n. 773
comparire mascherati in luogo pubblico / appear masked in a public place
Legge 8 agosto 1977, n. 533, Disposizioni in materia di ordine pubblico, Articolo 2
l'uso di caschi protettivi / use of protective helmets
qualunque altro mezzo atto a rendere difficoltoso il riconoscimento della persona, in luogo pubblico o aperto al pubblico, senza giustificato motivo / any other mean aimed to make difficult to recognise a person, in a public place [e.g. a square] or open to the public [e.g. a museum or a bar], without a justified reason
As I stated before religion is actually considered a justified reason; the only current pitfall is that as of August 2017 the county of Veneto seems to have declared illegal the use of Niqab and Burka -but I can't find the exact law, and on top on that I'm not even sure if such a law can be recognised on a national level, sounds more like the stuff that local administrations do to show off to their electors.