We report a very simple and novel one-step method to synthesize silver-core-gold-shell or silver-gold alloy nanoparticles by in situ sunlight-reduction in AgNO3 solution and NaAuCl4 solution in the presence of DNA. It was found that the DNA acted as template and reducing agent in the formation of the novel nanostructure. The Ag–DNA could be formed from reduction of cationic silver absorbed on the DNA template by sunlight. The silver-core-gold-shell or silver-gold alloy nanostructures were prepared by seeding with Ag–DNA in the absence of any surfactants, and could be used as active surface enhanced Raman scattering (SERS) substrates. 2,4,6-Trinitrotoluene (TNT) was studied on these substrates with very low concentration (10−12 M), and great enhancement factors were found (3.1 × 1011 to 1.5 × 1012). It was found that the enhancement ability was affected by the structures of the gold and silver nanoparticles on the DNA strands. The results showed that these SERS substrates could achieve the lowest detection limits of TNT compared to previous reports. Furthermore, the Ag–DNA network placed onto comb-like gold electrodes can be utilized as a biosensor of cancer, which presents a good response for the detection of carcinoembryonic antigen (CEA).