Photonic crystal (PC) thin films that are self-assembled from different-sized silica microspheres were prepared for studying mechanical properties via nanoindentation at the submicron scale. We found that the silica photonic crystals (PCs) possessed a face-centered cubic (FCC) microstructure and their elastic modulus and hardness were in the range of ~1.81–4.92 GPa and 0.008–0.033 GPa, respectively. The calculated results proved that there were size-dependent properties in the silica PCs, in that the elastic modulus and hardness increased as the diameter decreased from 538 nm to 326 nm. After studying the total work and plastic work in the progressive deformation of silica PCs during the nanoindentation tests, we developed a two-stage deformation model to explain how the microsphere size affects the mechanical properties of PC thin films. The phenomenon of “smaller is stronger” is mainly due to the energy consumption, which combines the effects of microstructure collapse, microsphere slide, and reduced porosity during the whole loading and unloading process. In addition, the results of numerical simulation matched the experimental data and reflected the energy change rules of PCs during the indentation process. Furthermore, the study affords useful guidance for constructing high-performance films with proper design and potential application in next-generation PC materials.