One of the prime manifestations of an anisotropic electronic state in underdoped cuprates is the in-plane resistivity anisotropy Δρ≡(ρa-ρb)/ρb. Here we use a Boltzmann-equation approach to compute the contribution to Δρ arising from scattering by anisotropic charge and spin fluctuations, which have been recently observed experimentally. While the anisotropy in the charge fluctuations is manifested in the correlation length, the anisotropy in the spin fluctuations emerges only in the structure factor. As a result, we find that spin fluctuations favor Δρ>0, whereas charge fluctuations promote Δρ<0, which are both consistent with the doping dependence of Δρ observed in YBa2Cu3O7. We also discuss the role played by CuO chains in these materials, and propose transport experiments in strained HgBa2CuO4 and Nd2CuO4 to probe directly the different resistivity anisotropy regimes.