To add more details to other replies you received, the primary factors are Rayleigh scattering and impurities absorbing light energy, at 1550nm (where this loss is least pronounced) the number that usually gets thrown around is 0.2dB/km in attenuation. That adds up to needing those repeaters at the intervals we have them.