The term comes from old radio slang. When communicating over radio, the operator would report the strength and clarity of the signal on a scale of 1 to 5 each. Therefore, if a radio operator described the signal as "five by five" it meant it was both loud and clear.
The more metaphorical meaning, popularized by Faith Lehane from the television show Buffy the Vampire Slayer, wasn't recorded until the 1980s.
The use of the word is primarily used in the military, or when discussing something similar.
'Yeah, everything is five by five'"