The term "in the doghouse" is a colloquial expression which equates to being in trouble or being out of favor.
Some etymologists suggest it originated with the book Peter Pan, due to the father crawling into the dog kennel to show his shame for allowing his kids to be kidnapped, but that is usually discredited because the word "dog house" was an American slang term that showed up years later.
The first known written example of "in the doghouse" was in a 1926 book by JJ Finerty, Criminalese. Documenting the slang definitions that criminals used, it meant to be in disfavor. In 1933, the term appeared in a 1933 edition of an Iowa newspaper, The Waterloo Daily Courier.
The term gained popularity, and was a common joke among cartoonists and writers. Comics had routines based around being in the doghouse when talking about their spouses. More recently, author Orson Scott Card is in the doghouse over his anti-gay opinions, to the point where people are boycotting his movie, Ender's Game.