If you are replacing an existing line, the easiest way to determine what diameter you need is to match what you already have. This can be done with a caliper or by close estimation with a tape measure. If you've previously used a 7mm halyard and it has performed well, another 7mm line is likely a great choice. In most applications, there is some flexibility in the exact diameter that can be used. Most blocks, for example, have an 'ideal' diameter (ie, the line diameter that runs most effectively though the block's sheave) but also have a range so that you can run a slightly thinner or slightly thicker line. If you have a halyard that is getting hung up in your rig, stepping down 1-2mm might help the halyard run more efficiently. If you have a larger boat or rig and want to run a thinner halyard, consider a double braid line that features a Dyneema or spectra core for strength.