The lattice dynamics and thermodynamic properties of Mg2Si and Mg2Ge are studied based on the first principles calculations. We obtain the phonon dispersion curves and phonon density of states spectra using the density functional perturbation theory with local density approximations. By employing the quasi-harmonic approximation, we calculate the temperature dependent Helmholtz free energy, bulk modulus, thermal expansion coefficient, specific heat, Debye temperature and overall Grüneisen coefficient. The results are in good agreement with available experimental data and previous theoretical studies. The thermal conductivities of both compounds are then estimated with the Slack's equation. By carefully choosing input parameters, especially the acoustic Debye temperature, we find that the calculated thermal conductivities agree fairly well with the experimental values above 80 K for both compounds. This demonstrates that the lattice thermal conductivity of simple cubic semiconductors may be estimated with satisfactory accuracy by combining the Slack's equation with the necessary thermodynamics parameters derived completely from the first principles calculations.