Some social media platforms may have broken the law by allowing children under 16 to access their apps, the government says.