X-ray emission can provide a crucial diagnostic of gamma-ray bursts (GRBs). We calculate the X-ray and gamma-ray spectra of impulsive acceleration episodes related to GRB pulses. We use the synchrotron shock model (SSM) as a basis of our calculations. We show that the current data on soft-to-hard emission ratios of GRB pulse emission are in agreement with the SSM. In particular, GRB averaged pulse emission detected by Ginga is in agreement with the SSM low-energy spectra. We deduce that Ginga detected the majority of bright GRBs detectable by BATSE. These results indicate that the physical environment surrounding the GRB emission site is optically thin to X-ray photon energies for a large fraction of burst duration. We also calculate emission ratios in the Einstein, ROSAT, Satellite per Astronomia raggi X (SAX), and HETE energy bands, and discuss how future information on simultaneous soft/hard GRB emission can contribute to distinguishing different emission models. Two different components of X-ray emission may simultaneously exist in a fraction of GRBs. One component is clearly associated with the individual GRB pulses, and an additional component may be related to the pulse X-ray spectral upturns and/or the precursors/tails occasionally observed. We also show that a meaningful search of GRB-driven X-ray flashes in Andromeda (M31) can be carried out with existing ROSAT PSPC data and future SAX WFC observations.