Urban Building Energy Modeling (UBEM) is vital for analyzing building energy performance, integrating detailed models of building systems, environmental factors, and occupant behavior. Despite its importance, UBEM faces challenges with uncertainty in model inputs, particularly when scaling from individual buildings to districts. This uncertainty is largely due to the stochastic nature of occupant behavior, which current models often oversimplify with fixed occupant schedules. Consequently, using the same occupant schedules for similar buildings leads to unrealistic peaks in energy demand. This thesis aims to enhance UBEM's accuracy by developing a framework for extracting and modeling realistic occupant schedules from historical data in mixed-use districts, addressing the unpredictable elements of occupant behavior and reducing the uncertainty in energy simulations. This research aims to improve UBEM through several key objectives. Firstly, it involves creating a comprehensive database that consolidates 3D geometry models with detailed building information from various sources, effectively creating a digital twin of buildings that can be further enhanced with additional data. The second objective is to develop a standardized data model for building occupancy scheduling, tailored to different building types within UBEM. Thirdly, the research focuses on developing a data-driven method to extract representative occupant schedules, particularly related to electrical equipment usage in institutional buildings across diverse climate zones. This leads to the fourth objective: the development of a novel stochastic model using the Markov-Chain Monte Carlo (MCMC) technique, which dynamically generates occupant schedules and models energy demand at both building and urban scales. To increase efficiency and accuracy, the fifth objective is to replace the MCMC method with a Gaussian mixture model. The sixth objective integrates this stochastic model into the UBEM system to form building archetypes. The research concludes with neighborhood-level building energy simulations and model validation using real data, confirming its accuracy and real-world relevance. The study's outcome is the creation of occupant-related schedules tailored for each new building simulation, accommodating the stochastic nature of occupant behavior. The research has extensive implications, aiding in sustainable and efficient urban building design and operations, and shaping energy policy and urban planning strategies worldwide.