Earlier studies on adults have shown that functional connectivity (FC) of brain networks can vary depending on the brain state and cognitive challenge. Network connectivity has been investigated quite extensively in children in resting state, much less during tasks and is largely unexplored between these brain states. Here we used functional magnetic resonance imaging and independent component analysis to investigate the functional architecture of large-scale brain networks in 16 children (aged 7–11 years, 11 males) and 16 young adults (aged 22–29 years, 10 males) during resting state and visual working memory tasks. We identified the major neurocognitive intrinsic connectivity networks (ICNs) in both groups. Children had stronger FC than adults within the cingulo-opercular network in resting state, during task performance, and after controlling for performance differences. During tasks, children had stronger FC than adults also within the default mode (DMN) and right frontoparietal (rFPN) networks, and between the anterior DMN and the frontopolar network, whereas adults had stronger coupling between the anterior DMN and rFPN. Furthermore, children compared to adults modulated the FC strength regarding the rFPN differently between the brain states. The FC within the anterior DMN correlated with age and performance in children so that the younger they were, the stronger was the FC, and the stronger the FC within this network, the slower they performed the tasks. The group differences in the network connectivity reported here, and the observed correlations with task performance, provide insight into the normative development of the preadolescent brain and link maturation of functional connectivity with improving cognitive performance.