According to Aileen Ward's biography of John Keats (English poet (1795-1821), who took an interest in English slang of the day, "hanging out" connoted "stopping at a tavern," i.e. spending time drinking, which fully comports with the modern sense of the slang expression. This indicates that the phrase was current in London in 1816 at the latest!
"Hey, Keats, man: Byron and some of the other poetic dudes are planning to hang out at Jack Straws before we go to sup. Like to join us?"