The morphological evolution during spinodal decomposition in binary alloy thin films elastically constrained by substrates is studied. Elastic solutions, derived for both elastically isotropic and anisotropic thin films subject to mixed stress-free and constraint boundary conditions, are employed in a three-dimensional phasefield model to investigate the effect of coherency strain and substrate constraint on microstructural evolution. The temporal evolution of the Cahn-Hilliard equation under thin film boundary conditions is solved with a semi-implicit Fourier-spectral method. The phase separation with coherency strain in an elastically anisotropic film shows the behavior of surface-directed spinodal decomposition driven by the elastic energy effect. Negative elastic anisotropy in the cubic alloy causes the alignment of the phases along <100> elastically soft directions.