In this paper we introduce a three-dimensional Lattice-Boltzmann model that recovers in the continuous limit the Maxwell equations in materials. In order to build conservation equations with antisymmetric tensors, like the Faraday law, the model assigns four auxiliary vectors to each velocity vector. These auxiliary vectors, when combined with the distribution functions, give the electromagnetic fields. The evolution is driven by the usual Bhatnager-Gross-Krook (BGK) collision rule, but with a different form for the equilibrium distribution functions. This lattice Bhatnager-Gross-Krook (LBGK) model allows us to consider for both dielectrics and conductors with realistic parameters, and therefore it is adequate to simulate the most diverse electromagnetic problems, like the propagation of electromagnetic waves (both in dielectric media and in waveguides), the skin effect, the radiation pattern of a small dipole antenna and the natural frequencies of a resonant cavity, all with 2% accuracy. Actually, it shows to be one order of magnitude faster than the original Finite-difference time-domain (FDTD) formulation by Yee to reach the same accuracy. It is, therefore, a valuable alternative to simulate electromagnetic fields and opens lattice Boltzmann for a broad spectrum of new applications in electrodynamics.