The generation, manipulation and detection of terahertz-frequency electromagnetic radiation are topics of great current theoretical and experimental interest. In particular, the coherent generation and detection of ultrashort pulses of terahertz radiation has opened up the field of terahertz time-domain spectroscopy, which permits the simultaneous measurement of amplitude and phase of the terahertz electric field. In this paper, the emission of terahertz radiation from bare semiconductor surfaces following photoexcitation by ultrashort pulses of near-infrared radiation is studied using ensemble Monte Carlo simulations. The simulation allows us to examine separately distinct scattering mechanisms and to vary the materials parameters of bandgap, absorption coefficient, effective mass, and surface potential. The narrower-gap semiconductor InAs and the wider-gap semiconductor GaAs are given as examples in which diffusion and drift processes, respectively, dominate. We find that scattering is relatively unimportant in the case of InAs but is very important in the case of GaAs.