Osteocytes use an elaborate network of dendritic connections to control bone remodeling. Some osteoblasts embed within mineralized bone matrix, change shape, and become osteocytes. The molecular circuitry that drives dendrite formation during "osteocytogenesis" is poorly understood. Here we show that deletion of Sp7, a gene linked to rare and common skeletal disease, in mature osteoblasts and osteocytes causes severe defects in osteocyte dendrites. Unbiased profiling of Sp7 target genes and binding sites reveals unexpected repurposing of this transcription factor to drive dendrite formation. Osteocrin is a Sp7 target gene that promotes osteocyte dendrite formation and rescues phenotypic and molecular defects in Sp7-deficient mice. Single-cell RNA-sequencing demonstrates overt defects in osteocyte maturation in vivo in the absence of Sp7. Sp7-dependent gene networks enriched in developing osteocytes are associated with rare and common human skeletal traits. Moreover, humans homozygous for the osteogenesis imperfecta-causing SP7R316C mutation show dramatic defects in osteocyte morphology. Genes that mark osteocytes in vivo and that are regulated by Sp7 in vitro are highly enriched in neurons, highlighting shared features between osteocytic and neuronal connectivity. Taken together, these findings reveal a crucial role for Sp7 and its target gene Osteocrin in osteocytogenesis, demonstrating that pathways that control osteocyte development influence human bone diseases.