This is a still from the film Dunkirk. I realise this is not a historical document, but I have also found a similar feature in photos of real Spitfires. What is the purpose of this?
According to flight manuals, this allows the pilot to maintain a view on the outside if the windscreen becomes obscured:
Source: Aircraft manual
This manual locates the panel on the right side. Online forums see this as a typographer mistake, but @TomMcW has found some aircraft had it indeed on the right side:
On the reason for mist apparition:
Note the punch-out panel on the canopy cover, an early solution to the new problem of canopy misting caused by the rapid altitude changes possible in the Spitfire.
Source: Flight Journal (pg 28)
Mins is right, but it's a more general thing: Glider planes have them too, or at least those built in the 80s that I flew in the 90s.
One of their effects is that they whistle in the (self-made) wind. Basically any deceleration is immediately noticeable in the note of the whistle going down (helps avoid stalling)... Relevant for a glider, but probably inaudible over a Spitfire's noise!