Is there any visual indicator or a way of measuring how far away a target is? That way I can see if I'm outside of my sniper rifles optional range before shooting.
The only way I've seen to determine how effective an attack might be is through using VATS. When you've selected a target, you will see their current health. Part of that health bar will be darkened or blinking. (Don't have the game in front of me now, so I'm not certain which.) This indicates how much damage your attack would do if successful. It appears to take into account things like bonuses for head-shots and sneak attacks, so I expect range is factored in as well.
Unless a weapon has some sort of special feature on it (such as a range-finding scope; I haven't completed the game yet, so I'm not sure whether or not these might exist), or someone makes an appropriate mod for your platform, VATS is probably the best you can do. After using VATS with certain weapons for awhile, you might be able to make reasonably accurate guesses by yourself. But that's about it.