The establishment of complex expression patterns at precise times and locations is key to metazoan development, yet a mechanistic understanding of the underlying transcription control networks is still missing. Here we describe a novel thermodynamic model that computes expression patterns as a function of cis-regulatory sequence and of the binding-site preferences and expression of participating transcription factors. We apply this model to the segmentation gene network of Drosophila melanogaster and find that it predicts expression patterns of cis-regulatory modules with remarkable accuracy, demonstrating that positional information is encoded in the regulatory sequence and input factor distribution. Our analysis reveals that both strong and weaker binding sites contribute, leading to high occupancy of the module DNA, and conferring robustness against mutation; short-range homotypic clustering of weaker sites facilitates cooperative binding, which is necessary to sharpen the patterns. Our computational framework is generally applicable to most protein-DNA interaction systems.