Yes, the Equalities Act 2010 (previously the Disability Discrimination Act) is such a law in the UK. And it has been used before for prosecuting companies offering poor accessibility (generally for things like offers only being available to fully-sighted people who browse a website with mouse, so users with screenreaders, or only using keyboard can't actually access such offers).
Airline "BMI Baby" were one such company that were taken to court: https://econsultancy.com/blog/8834-rnib-gets-tough-with-bmibaby-over-accessibility/
Now, this article states that (as of 2012) no company had been successfully sued for poor accessibility, but that may not be true today (I'm not sure) however, just being taken to court over poor accessibility isn't exactly something companies would want to happen to them. Even if they win it's still very poor PR among many other negative consequences (the main consequence being that less than 100% of your possible target audience can use your site).