depends on the light... 18-24" for a quantum board and maybe 18" or less for a bar-style with diodes distributed over a larger space at same watts. MAybe 16-18" with a bar-style light.. some like them clsoer, but if they are powerful, will need extra co2 for that. 16-18" helps even out coverage too. you can use height to adjust intensity, but it impacts how stuff grows on edges... with powerful lights, you want to let best coverage dictate height.
A phone lux meter app can help. Lux is not too useful on its own, but it is proportional. So, you probably don't want the edges more than 50% of central area measured at same distance from light with the most powerful lights you'd want relative to an area.
50% of center? 66% of center? lil trial and error because the actual intensity of the light varies and is a big factor.. 50% of 500ppfd isn't good, but 50% of 1000ppfd isn't so bad over 12 hours (those values would roughly equate to 22-45dli, which is as low and high as you want to go with ambient co2). Usually I speak relative to 12/12 cycle becuase it ismore demanding. hours of use is proportional to change in DLI). So, if you do 18/6 and 12/12 it's easy to convert... 66% what you need in bloom 12/12 is perfect at same hieight in vege on 18/6 cycle. No thinking necessary. (3/2 or 2/3 depending on direction you are converting- or, 18/12 & 12/18)
Anyway, let geometry/coverage pick your height, if you can.
sorry, i speak in terms of always pushing maximum DLI. With less, you may want to lower height a bit to futher increase intensity in bloom. If you can push a lot more than 66% power on a 18/6, this means that light will need a little more oomph on a 12/12 cycle because you can give 150% more... if running 90% in vege, you could go to 135%, which isn't possible of course.. it means you'll be giving less light per day in bloom than you were in vege that the plant has proven it can handle. Can add a little light or reduce height and sacrifice a bit on edges... what is best? not 100% sure, lol, but those are the dynamics at play. inverse square law applies to changes in height, so a little goes a long way.
This might be more applicable to all situations:
Whatever you can push on an 18/6 cycle, you know you can push 150% of that on 12/12 at same distance safely. *assumes your environment does not drastically change. If not feasible to add 150% power, you can get the light a bit closer (loses some coverage) and/or use a 13/11 light schedule to gain 8% back toward what you did provide in vege vs 12/12 schedule. Otherwise, you accept giving less than before or add another light... "max" is not required... but anything near or below 22 DLI is going to produce larfy buds at high proportions all over.
read up on DLI/ppfd.. puts it into proper perspective. don't need to memorize the equations.. just understand gist of it. hours of use per day, umol/s of PAR produced relative to 1m^2 area... these factors are all proportional. increase one 150%, and you increase DLI by 150%. Reduce hours 2/3rds, lose 2/3rds DLI. Reduce hours 2/3rds and increase power 3/2 (150%), it balances out to same DLI as before...