We report quantum Monte Carlo calculations of ground and low-lying excited states for nuclei with A{le}7 using a realistic Hamiltonian containing the Argonne v{sub 18} two-nucleon and Urbana IX three-nucleon potentials. A detailed description of the Green{close_quote}s-function Monte Carlo algorithm for systems with state-dependent potentials is given and a number of tests of its convergence and accuracy are performed. We find that the Hamiltonian being used results in ground states of both {sup 6}Li and {sup 7}Li that are stable against breakup into subclusters, but somewhat underbound compared to experiment. We also have results for {sup 6}He, {sup 7}He, and their isobaric analogs. The known excitation spectra of all these nuclei are reproduced reasonably well and we predict a number of excited states in {sup 6}He and {sup 7}He. We also present spin-polarized one-body and several different two-body density distributions. These are the first microscopic calculations that directly produce nuclear shell structure from realistic interactions that fit NN scattering data. {copyright} {ital 1997} {ital The American Physical Society}