A Theme of Faith
Before the final book was released, JK Rowling had been questioned on her religious orientation. She declined to discuss it in any detail as she said it might give people ideas about where the series might turn. Looking back, this was a bizarre thing to say as I don't think anyone would have guessed that the seventh book would be based around the idea of faith, even after reading it.
After the publication of The Deathly Hallows, JKR revealed she was a quasi-churchgoing Christian and that the seventh book represented (to a degree) her struggle with faith. Harry, Ron and Hermione battle through a very challenging period in which unrelenting exposés on Dumbledore's past wear away at his infallible sheen. The trio start to question his judgement: can he be trusted; did he know what he was doing; why did he hide critical information? This leads Harry to start chasing the deathly hallows, instead of following Dumbledore's explicit (but frustrating) instructions. After much trauma, Harry has a change of heart and decides the only way they are going to succeed is to trust in Dumbledore and complete their mission.
You can probably see why I have a problem with this. Dumbledore has (deliberately, apparently) withheld masses of information, hoping their ignorance will keep them from straying from his plan. In the meantime, the trio are presented with mountain upon mountain of evidence that Dumbledore wasn't always such a nice guy. He colluded with dark wizards; he preached intolerance of muggles; his family died suddenly under curious circumstances; he knew of, but secreted, a trio of hugely powerful objects that could help them destroy Voldemort. Under those circumstances, those wishing to make decision based on evidence might seem foolish indeed to blindly follow his confusing instructions. But JKR's lesson, apparently, is to overcome your struggle with faith in contradictory information, contrary to established evidence, and everything will be alright.
This is a very religious, dogmatic style of thinking. I'm not trying to make this an anti-religious post, but let's just say that following the advice of old man with an ever-crumbling reputation over facts that exist in front of your face is both dangerous and foolish. Of course, it all works out in the end, but if JKR was a little darker and a little more dastardly, she could have so easily revealed than Dumbledore was batshit crazy and the real test for the trio was to break free of his insane plan and find their own way. The lesson: never blindly trust anyone by word alone, even those who seem extraordinarily wise.
Despite her religious leanings and ultimate theme, Rowling never brings religion into the story. She also appears to write with a special care to never concrete heaven as truism. People might just die and be gone forever in Rowling's world. The living portraits are explicitly defined as an imprint of the living person, but not their continuing essence. Ghosts are most likely a similar 'imprint', doomed to exist forever as a shadow of the person departed. The reanimated spectres of the resurrection stone are described as yanking the resting soul back to the living world in the fairy tale that describes them, but in the 'real world' they say they are 'part of [the stone bearer]' suggesting they are a mere reflection of the person seeking to awaken the dead. It is left deliberately ambiguous whether Harry really travels to limbo after his 'death' or whether he has a few minutes of delusion: 'of course it's all in your head, Harry. But why should that mean it isn't real?'
If I really wanted to be a hard-nosed, sceptic, atheist fuddy-duddy (my speciality!), I could just read these ghostly scenes and assume there is no heaven and that people don't live on after death; Rowling provides exactly the narrative to think this way. Personally, I simply say that I don't know what happens in Harry's world. It's not clear enough for me to make a decision about the nature of the ghostly undead, so I'm happy being left undecided.
But it is interesting the Rowling chose not to make an explicit truth in heaven or an afterlife. Of course, creating an intraversable barrier between death and life was extremely necessary - the whole series depends on death being final, and lost friends gone forever. Therefore, like us, wizards and witches cannot see beyond the world of the living in any real sense and have to guess what awaits them, like the rest of us.
The Requirement for Evidence
Rowling's 'virtue of faith' turn in the series finale is actually out of character, looking back over the series. The entire horcrux hunt is instigated from the conclusions of a particularly scientific process carried out by Dumbledore himself.
Based on observation made in earlier books (a carelessly unguarded piece of Voldemort's soul and Voldemort waxing lyrical about having pursued immortality to its extremes), Dumbledore started researching Tom Riddle's history for clues and confirmation that he had created multiple horcruxes. So strongly did he value evidence that he insisted that they decipher a scrambled memory in which a young Tom Riddle mused over the strengths of a seven-part soul, before leaping to conclusions.
Hermione frequently resists jumping to conclusions based on Harry and Ron's wild speculation. Only in the final two books, when Harry has grown wiser and sharper, does her resistance to his theorising prove incorrect. In Chamber of Secrets, she makes them spy on Draco, when Harry speculates that he is attacking students. In The Order of the Phoenix, she forces Harry to make absolutely sure Sirius is missing when Harry has a vision of his torture at the Ministry. It is her constant requirement for evidence that stops the more impetuous boys from charging down dead ends and chasing ghosts.
It is interesting that a series build on chasing clues and evidence to solve mysteries and (attempt to) save the day should rely on faith as its ultimate guide to victory. I can understand it as a parallel with the overriding themes of love and trust and the power therein, but it does seem that Harry got lucky. By the time he chose to put his faith in Dumbledore and stop questioning the horrors he'd learned, it really did appear as if Dumbledore didn't love him very much at all. If it were me, I might well have found my own path to victory and really isn't that the biggest part of a coming-of-age epic?