Progress in optics technology has enriched our daily lives in many ways. Various types of single-photon detector technologies have emerged in the last century. Among these, single-photon avalanche diode (SPAD) technology outperforms other detectors for its room temperature operation, picosecond timing resolution, manufacturability, and scalability. In 2017, the largest SPAD array size of 512x512 and the smallest SPAD pixel pitch of 3 µm were reported. In parallel to such a continuous scaling, researchers have adopted the SPAD sensors to diverse application fields such as time-of-flight (ToF) ranging, fluorescence lifetime imaging microscopy (FLIM), space applications, and Raman spectroscopy, as well as other scientific imaging. Common to these applications is the growing demand for larger SPAD arrays to enhance spatial resolution, dynamic range, data acquisition speed, and overall functionality. Achieving a megapixel array has been one of the most important milestones for SPAD research for over 10 years, but also one that has proven as elusive. To accomplish this goal, we start with a theoretical analysis of scaling laws for SPAD performance characteristics to clarify the underlying tradeoff relations in the SPAD pixels below 10 µm in pitch. To address the severe degradation of fill factor in the miniaturization, we propose a novel guard-ring-sharing technique, potentially pushing the limit of pixel miniaturization in conventional SPAD structures. The proposed concept is verified by extensive characterization in 4x4 test SPAD arrays, where the world's smallest pixel pitch of 2.2 µm was achieved. Next, we propose a new-generation SPAD structure: charge focusing SPAD. The proposed concept is promising for overcoming a fundamental tradeoff between photon detection efficiency (PDE) and dark count rate (DCR), while suppressing correlated noise, hot pixel population, and power consumption. A proof-of-concept 128x128 charge focusing SPAD image sensor is developed for feasibility study towards low-light imaging applications, and we demonstrate the world's lowest DCR density of 0.015 cps/µm2 at room temperature. To open the door to scalable time-resolved SPAD arrays, we propose novel system concepts of successive approximation ToF and coded time gating. The concepts are implemented in backside-illuminated (BSI) 3D-stacked SPAD sensors based on 45 nm/22 nm CMOS process with the resolution up to 0.5 megapixel. As a highlight of this thesis, we demonstrate the world's first 1 megapixel SPAD image sensors based on time-gating approach. A proposed readout circuit sharing technique achieves significant fill factor improvement and orders of magnitude suppression of power consumption under strong illumination. The best-in-class noise characteristics and well-controlled non-uniformity in the timing performance ensure feasibility of the SPAD sensor towards a broad range of applications. We showcase the experimental results in 2D and 3D imaging applications based on the megapixel SPAD image sensor. Finally, we apply the developed megapixel time-gated SPAD image sensor to the light-in-flight imaging. Unprecedentedly high spatio-temporal resolution enables the observation of an astronomical phenomenon called superluminal motion in the laboratory scale. We propose a new algorithm to reconstruct extra-dimensional information from 3D (x,y,t) spatio-temporal dataset, and successfully present 4-dimensional (x,y,z,t) light-in-flight imaging for the first time.