Recent solar flare observations in the sub-THz range have provided evidence of a new spectral component with fluxes increasing for larger frequencies, separated from the well-known microwave emission that maximizes in the GHz range. Suggested interpretations explain the THz spectral component, but do not account for the simultaneous microwave component. We present a mechanism for producing the observed double-spectra. Based on coherent enhancement of synchrotron emission at long wavelengths in laboratory accelerators, we consider how similar processes may occur within a solar flare. The instability known as microbunching arises from perturbations that produce electron beam density modulations, giving rise to broadband coherent synchrotron emission at wavelengths comparable to the characteristic size of the microbunch structure. The spectral intensity of this coherent synchrotron radiation (CSR) can far exceed that of the incoherent synchrotron radiation (ISR), which peaks at higher frequency, thus producing a double-peaked spectrum. Successful CSR simulations are shown to fit actual burst spectral observations, using typical flaring physical parameters and power-law energy distributions for the accelerated electrons. The simulations consider an energy threshold below which microbunching is not possible because of Coulomb repulsion. Only a small fraction of the radiating charges accelerated to energies above the threshold is required to produce the microwave component observed for several events. The ISR-CSR mechanism can occur together with other emission processes producing the microwave component. It may bring an important contribution at microwaves at least for certain events where physical conditions for the occurrence of the ISR-CSR microbunching mechanism are possible.