That is indeed the correct way to set the light's intensity. It's likely you have an error elsewhere in your code or you're not interpreting the results of the light intensity correctly. For example you might be creating multiple lights on accident and their combined intensities might look brighter than you're expecting.
Check the object hierarchy to make sure you don't have multiple lights. Also use the inspector to determine the actual intensity of the light you have created.
Finally you can attach the debugger and inspect to properties of the light after creation to ensure they're being modified as you expect and that the value is not being modified elsewhere.