As with many familiar phrases, you may not have considered the origin of "caught red-handed." Or maybe you saw the "Money Bag Shawty" episode of Atlanta, and it got you thinking about what it actually means. (It's not as nefarious as the episode suggests it could be.)
Unlike many idioms, this hasn't undergone a significant change in meaning since it first appeared. To be "caught red-handed" is to be caught in the act of wrongdoing. "I told Dante not to touch my fries when I left the room. When I came back, he was caught red-handed in the act of taking my damn fries."
The most commonly cited origin of the phrase "redhand" or "red hand" dates back to Scotland in the 15th century, per Today I Found Out, which notes it most likely originated as a reference to someone having blood on their hands. The first usage was in Scottish Acts of Parliament of James I in 1432. It then began to pop up in Scottish legal proceedings in reference to a person who was caught in the act of a crime.
Another origin, occasionally referenced, pertains to a myth that originated in the Northern Ireland province of Ulster. A boat race was called to crown the next king. The first person to touch the shore would earn the honor. One overly determined man cut off his own hand and flung the bloody appendage to shore to ensure his victory. However, the story of his bloody red hand is a myth and is not the origin of the phrase.
TIFO traces that usage's transition from "red hand" to "red-handed" in Sir Walter Scott's Ivanhoe. "I did but tie one fellow, who was taken redhanded and in the fact, to the horns of a wild stag," Scott wrote. Ivanhoe helped the phrase spread throughout the English-speaking world.
It wasn't until later that the full phrase "caught red-handed" was used. The first instance of that appears in 1857 in George Alfred Lawrence's Guy Livingstone. From there it proliferated to the familiar phrase almost everyone has used, including Sponge Bob.
h/t Today I Found Out