We theoretically investigate the influence of designed pulse sequences in restoring quantum coherence lost due to background noise in superconducting qubits. We consider both 1/f noise and random telegraph noise and show that the qubit coherence time can be substantially enhanced by carefully engineered pulse sequences. Conversely, the time dependence of qubit coherence under external pulse sequences could be used as a spectroscopic tool for extracting the noise mechanisms in superconducting qubits, i.e., by using Uhrig s pulse sequence [Phys. Rev. Lett. 98, 100504 (2007)], one can obtain information about moments of the spectral density of noise. We also study the effect of pulse sequences on the evolution of the qubit affected by a strongly coupled fluctuator and show that the non-Gaussian features in decoherence are suppressed by the application of pulses.