We quantitatively evaluated oxygen octahedral distortions in epitaxial thin films of the itinerant ferromagnet, La0.5Sr0.5CoO3 (LSCO), and investigated their impact on strucure-property relationships. The compressively strained film on a LaAlO3 substrate has a lower electrical resistivity and higher ferromagnetic transition temperature than the tensilely strained film on a La0.30Sr0.70Al0.65Ta0.35O3 substrate. The magnetic anisotropy is also found to depend on the type of strain, with perpendicular magnetic anisotropy induced in the compressively strained film and in-plane magnetization seen in the tensilely strained film. Our synchrotron x-ray-diffraction measurements and quantitative analysis reveal distinct oxygen octahedral distortions accommodated in these films and show that the out-of-plane and in-plane Co-O bond lengths of the compressively strained film are comparable to the in-plane and out-of-plane bond lengths of the tensilely strained film. These results indicate that the bond-length changes in LSCO modify hybridization between Co 3d and O2p orbitals, leading to the strain-dependent properties. These results highlight the significant role of octahedral distortions for structure-property relationships in the strained LSCO films.