"That moment when..." is a popular way to express sentiments on many corners of the internet, especially sites with brief status updates such as Facebook and tumblr. Following the preface "That moment when..." a situation is briefly described. For example "That moment when you realize your best friend is dating your ex-girlfriend", "That moment when you hear your tire pop", "That moment when you realize that David Tennant has portrayed a parricide in three of his most famous roles". And so on. Many of these mini-revelations are commonplace, while many depend on knowledge or interest in popular culture.
One thing to notice about phrases such as these is that they are sentence fragments. Grammatically and semantically, they do not portray a complete thought, but merely an image. In some ways, there is a certain evocativeness to this. On the other hand, it is perhaps symptomatic of the internet as it now is, with briefer and briefer fragments of meaning taking the place of what was once thoughtful discourse.