bang to rights · adverb1
From bang (“completely”) + to rights (“properly”). Originally US; attested from the start of the 20th century.
bang to rights · verb2
From reinterpretation of bang (“completely”) as bang (“to handle noisily or violently”).
Etymology from Wiktionary, CC BY-SA 4.0.