Fridge logic is the modern incarnation of what Alfred Hitchcock originally coined an 'icebox scene' -- a plot hole that is subtle enough that no one notices it while engaged in the story, recognizing it only later, "after you've gone home and start pulling cold chicken out of the icebox."
While Hitchcock was referring to a scene in Vertigo, in which the character Madeleine inexplicably disappears from the hotel, it has been taken up to become a common term amongst critics, directors, authors, and others who work with narratives of various sorts. In science fiction writing this may be referred to as a Jellybean Moment, after the unexplained jellybeans in Harlan Ellison's story Repent, Harlequin!, and in movies it is sometimes referred to as a popcorn moment. Jonathan Demme referred to it as a 'Refrigerator Question'. However, the most common modern phrasing is by far 'fridge logic', and it looks as though it will stay that way until we rename fridges yet again.
Fridge logic is so well established that TV Tropes recognizes subcategories including 'Fridge Horror' (something that only becomes truly scary once you've had time to process it) and 'Fridge Brilliance' (a clever trick, references, or twist, that you only notice later); however most examples they give of these are either fairly plebeian or are apparent on the second reading/watching, because one already knows the ending. However, these variations on fridge logic are very good things, and should be used whenever practical.
As far as writing sins go, fridge logic is a minor one. By definition, it doesn't interfere with the initial enjoyment of the story, and as it happens, fans love discovering minor plot holes -- it shows how familiar they are with the narrative, and often gives an impetus for fanfic. However, plot holes of all sorts should be avoided whenever possible, and you should always be on the lookout for your own icebox errors when writing.