Initially the term referred to the practice of removing one's shoes in order to dance in stocking feet, typically to spare the floor from the scuff marks of dress shoes.
In "Ready Teddy" (1956), Little Richard sings:
In the 1973 classic motion picture American Graffiti which is set in 1962 two kids named Steve and Laurie attend a high school freshmen sock hop dance. In one scene all the teens are dancing to "The Stroll" where a close up of their feet shows them dancing in white or black socks without any shoes.
In subsequent decades, with the widespread popularity of sneakers and other types of shoes, the practice of removing shoes was dropped and the term began to be applied more generally to any informal high school dance.
Record Hop refers to a hop at which disc jockeys played records. The number-one song of 1958 "At the Hop" by Danny and the Juniors, describes the scene. Sock hops were often record hops and vice versa.