The electronic structures and optical properties of KNbO3 were studied from the first principles using density functional theory. The energy band structures, dielectric function and optical constants of cubic and tetragonal phases are calculated using pseudopotential with local density approximation. A direct band gap at G point and an indirect band gap R- G point in the Brillouin zone are predicted for cubic and tetragonal phases. Both phases, the real and imaginary parts of the dielectric function and hence the optical constants such as reflectivity, refractive index, extinction coefficient, electron energy-loss function, E-eff (the optical dielectric constant) and N-eff (the effective number of electrons) per unit cell are calculated. The calculated spectra are compared with the experimental data in the orthorhombic phase and other theoretical results for KNbO3 and are found to be in good agreement with the results.