We model a time-dependent nonthermal particle and photon spectra for young SNRs by assuming diffusive shock acceleration of the nonthermal particles and address a possible hadronic contribution of TeV gamma-ray emission. In this model, the nonthermal electron and proton spectra, and then multiwavelength photon spectra that originated from both the electrons and the protons at different ages of the SNRs, are calculated respectively; the photon spectrum from radio to X-ray bands is dominated by synchrotron radiation of the relativistic electrons, and TeV gamma-rays are produced by electron bremsstrahlung, inverse Compton scattering, and the pi(0) decay due to the relativistic protons colliding with ambient medium. Our results indicate that the relative importance of the hadronic origin of TeV gamma-rays depends on the ratio of accelerated electrons to protons at the source, and the hadronic origin of TeV gamma-rays can dominate the bremsstrahlung and inverse Compton processes of the relativistic electrons for young SNRs when a reasonable value of the ratio of the electrons to the protons at the source is used. The model is applied to three young SNRs, RX J1713.7-3946, SN 1006, and RX J0852.0-4622; our model results can explain the multiwavelength photon spectra for the three SNRs and show that the high-energy gamma-rays from RX J1713.7-3946 and RX J0852.0-4622 may have hadronic origins.