Adding a driver to a Cycles node via Python
You need to add the driver on the output, not the node directly:

fcurve = node.outputs[0].driver_new("default_value")


or

fcurve = node.outputs['Value'].driver_new("default_value")


The driver expression is accessed like:

fcurve.driver.expression