There are many studies that show the benefits of compression socks. Most of them show the benefits of post-workout recovery. Let me know if you want links to the peer reviewed studies and I will get them to you.
Regarding the difference between $40 compression and $4 compression is the quality of compression. In order for the socks to be effective, they need to have a true pressure gradient. A good pair of compression socks will state the level of pressure gradient in mmHg (for example - 12-20mmHg, 20-30mmHg, 30-40mmHg, etc). If the manufacturer is not communicating the pressure gradient, they are just selling you tight socks branded as compression.
Quality compression socks cost more because they are regulated by the FDA. I know that sounds crazy for the FDA to regulate socks, but that is because they were originally developed for clinical applications (lymphdema, PVD, diabetes, etc). Any compression sock providing gradient compression has to be registered with the FDA.
If cost is an issue, I recently came across a site that sells high quality affordable compression socks and sleeves.Let me know if you want the link.