First some terminology.
A cardinal is a priest or bishop (these days nearly always a bishop) who is entitled to vote in the election of a new Pope.
A nuncio is an ambassador (nearly always a bishop) appointed by the Pope to represent the Pope to the secular authorities of a country (King, President etc.)
There is an elaborate ceremony when a bishop is made a cardinal. Part of this ceremony involves placing ("imposing") a biretta on the head on the new cardinal This article describes the procedure:
We shall see now the following step: the imposition of the biretta.
This ceremony hasn't a very solemn character, and may take place
either in a room of the Apostolic Palace, or in the Consistorial Hall.
In the afternoon of the day before the day chosen for the Public
Consistory, the new Cardinals -not wearing the cappa, but the
mantelletta, because this ceremony doesn't take place during a proper
Consistory- reach the apartments of the Secretary of State and, leaded
by the same Eminentissimo and escorted by their private court and by
the Swiss Guards, go to the Cappella Matilde where they wait for the
formal notice to go up to the hall where the ceremony is about to take
The Sovereign Pontiff, escorted by his Noble Secret Antechamber,
wearing the mozzetta and the red Papal stole -but not the falda-
reaches the hall were the ceremony will take place and sits on the
throne. The new Cardinals are then allowed to step in.
One by one, after the usual triple genuflection, they kneel in front
of the throne and kiss the Pope's foot.
The Pontiff clothes them with the red mozzetta (Cardinals in Rome wore
the mozzetta on the top of the mantelletta) and the red wool (not the
silk) biretta; then they stand up, take off the biretta, kiss the
Pope's hand and receive his embrace.
After the imposition of the birettas, the first of the appointed
Cardinals addresses to His Holiness a short discourse of thankgiving.
The Pontiff answers to it with a short allocution, and gives his
Apostolical Blessing. Then he departs.
After the ceremony, one of the Papal Masters of Ceremony gives the red
silk zucchetto to each of the new Cardinals.
If the new Cardinal is an Apostolic Nuncio to a Catholic country (in
most recent times: Italy, France, Spain and Portugal), things -until
1969- worked differently.
Only in this case - here a small correction to my previous post is in
order- the red silk calotte, or zucchetto, is carried to the newly
appointed Cardinal by a noble guard of His Holiness.
It is then a privilege of the Head of the State to impose the biretta
on the head of the new Cardinal.
In the article at this point there is a photograph captioned:
(Below: French President Vincent Auriol imposes the biretta on Angelo
Giuseppe Card. Roncalli's head)
So normally the Pope places the biretta on the new cardinal's head but if the new cardinal happens to be the nuncio to France, Spain etc. then up until 1969 the head of state of France, Spain etc. had the privilege of placing the biretta on the new cardinal's head.
In the Middle Ages there was no strict separation of church and state. For example the King's courts had no jurisdiction over clerics (monks, priests and bishop) - if a cleric committed a crime they would be tried in special church courts with appeals to the Pope. And the King and his lords had certain privileges in church appointments - the lord of the manor chose the priest for the parish church and some Kings even had the power of veto in the choice of a new Pope.
The privilege of a head of state imposing the biretta on the nuncio, if the nuncio was made a cardinal, was one of the "left overs" from the Middles Ages - no power as such but a privilege of being involved in the ceremony.