All-inorganic and lead-free cesium tin halides (CsSnX3, X=Cl, Br, I) are highly desirable for substituting the organolead halide perovskite solar cells. However, the poor stability of CsSnX3 perovskites has so far prevented the fabrication of devices that can withstand sustained operation under normal conditions. In this paper, a two-step sequential deposition method is developed to grow high-quality B-γ-CsSnI3 thin films and their unique phase change in atmosphere is explored in detail. We find the spontaneous oxidative conversion from unstable B-γ-CsSnI3 to air-stable Cs2SnI6 in air. Allowing the phase conversion of the CsSnI3 film to evolve in ambient air it gives the semiconducting perovskite Cs2SnI6 with a bandgap of 1.48 eV and high absorption coefficient (over 105 cm−1 from 1.7 eV). More importantly, the Cs2SnI6 film, for the first time, is adopted as a light absorber layer for a lead-free perovskite solar cell and a preliminary estimate of the power conversion efficiency (PCE) about 1% with open-circuit voltage of 0.51 V and short-circuit current of 5.41 mA/cm2 is realized by optimizing the perovskite absorber thickness. According to the bandgap and the Shockley-Queisser limit, such inorganic perovskite solar cell with higher efficiency and pronounced stability can be expected by material quality improvement and device engineering.