Yahoo was sued one day after the company said hackers stole information from at least 500 million accounts in 2014.