Accompanying Children to the Masjid: Permissible?

What is the ruling of accompanying children to the Masjid? What are the rules of taking chil ...