We calculate the energy decay rate of Josephson qubits and superconducting resonators from nonequilibrium quasiparticles. The decay rates from experiments are shown to be consistent with predictions based on a prior measurement of the quasiparticle density n(qp) = 10/microm(3), which suggests that nonequilibrium quasiparticles are an important decoherence source for Josephson qubits. Calculations of the energy-decay and diffusion of quasiparticles also indicate that prior engineered gap and trap structures, which reduce the density of quasiparticles, should be redesigned to improve their efficacy. This model also explains a striking feature in Josephson qubits and resonators-a small reduction in decay rate with increasing temperature.