Many factors do... I assume you want to have visible dot at some range. Here wavelength, power and beam specs are key factors. Depending on atmospheric conditions there might be various ranges as well. For visible dot of laser from your position also albedo of targeted object is influencing visibility (on white wall you get more visible dot than on dark green forest as it reflects better on white wall). For specifically beam specs divergence is crucial (how the laser dot enlarges with distance), beam expanders are used to improve it. In general you do not care that much about output beam diameter on long range, more about divergence as you can assume that somewhere in near range the diameter of thinner beam due to divergence will become bigger than diameter of beam after beam expander was used.
More about beam expanders:
https://www.edmundoptics.com/resources/application-notes/lasers/beam-expanders/
Regarding wavelength - shorter wavelength scatter more on air molecules as well as various dust and other particles in air. Also human eye is sensitive differently to various wavelengths (violet and red ends of spectre do not seem as bright as blue-green part). That's why there are yellow street lamps used - good visibility and long enough wavelength to pass through fog.
And power - it is obvious I guess. More power -> more energy density on same spot area -> more bright.
So here you have a few examples how to approach the problem.