Australian casual wear retailer Cotton On is being taken to court by the Australian Competition and Consumer Commission over allegations that it sold children's night dresses and pyjamas that posed an increased fire risk.