The microscopic generator-coordinate method is generalized to the calculation of matter densities in light nuclei having a cluster structure. Multipole components of the proton and neutron densities are calculated for the bound states and narrow resonances of B-8 and Li-8, as well as for transitions between these states. The proton densities of B-8 and neutron densities of Li-8 resemble each other. They suggest that the 2(+) and 1(+) states belong to a same band while 3(+) is of a different nature. For the 2(+) ground state, they display long tails which can be related to the slow decrease of the Be-7 + p and Li-7 + n relative wave functions. The tails of the B-8 neutron and Li-8 proton densities are much shorter and are sensitive to the choice of the model space. The thicknesses of the proton skin in B-8 and of the neutron skin in Li-8 are 0.42 and 0.35 fm respectively. The large value of the B-8 quadrupole moment is explained without a notion of halo, although the tail of the density contributes by about 20%. Whether the tail of the B-8 proton density can help determine the astrophysical S factor for the Be-7(p, gamma)B-8 reaction at zero energy is also discussed.