A surprise, like a bolt of lightning from a blue sky.
This has the feel of a Shakespearian or Biblical phrase, but it isn't as old as it sounds. There are several forms of it: 'out of the blue', 'a bolt out of the blue', etc. The earliest citation is Thomas Carlyle, in 'The French Revolution', 1837:
But for me all good Photographs are “Out of the Blue” as they always “’Take me’ Out of the Blue”!