Myth: "Look, there's a Union Jack flying above Buckingham Palace. That means the Queen's at home."
A Union Flag flying above the Palace actually means the queen is not in residence. The signal you're looking for is the Royal Standard, which is raised whenever Her Maj is at home.
The confusion started with the death of Diana, Princess of Wales in 1997. Before then, only the Royal Standard was flown from the Palace. To lower this to half mast was deemed inappropriate, so a Union Jack was hoisted as a symbol of national mourning. Since then, the protocol dictates that the Union Flag should fly whenever the monarch is away.
Further confirmation comes from the British Monarchy website:
On news of a Royal death, the Union Flag (or the Royal Arms of Scotland (Lion Rampant) where appropriate) is flown at half-mast. The Royal Standard is never flown at half-mast, as the Sovereign never dies (the new monarch immediately succeeds his or her predecessor).
So now you know...and 'the Sovereign never dies' should be the next Bond movie.