First principles calculations of structural, electronic, elastic, and phonon properties of the intermetallic compounds FeSi and CoSi in the B2 (CsCl) structure are presented, using the pseudopotential plane-wave approach based on density functional theory, within the local density approximation. The optimized lattice constants, independent elastic constants, bulk modulus, and first-order pressure derivative of the bulk modulus are reported for the B2 structure and compared with earlier experimental and theoretical calculations. A linear-response approach to density functional theory is used to derive the phonon dispersion curves, and the vibrational partial and total density of states. Atomic displacement patterns for FeSi at the Gamma, X, and R symmetry points are presented. The calculated zone-center optical phonon mode for FeSi is in good agreement with experimental and theoretical data.