You can use a Tween
You can either add a Tween
node to your scene tree, or create one manually. Either way, you can then do something like:
$Tween.interpolate_property(
energy, // node to operate on
"position", // property to change
random, // initial value
Vector2(random.x,500), // final value
1, // duration, in seconds
Tween.TRANS_LINEAR, // interpolation function, see https://docs.godotengine.org/en/3.1/classes/class_tween.html#enum-tween-transitiontype
Tween.EASE_IN, // easing function, see https://docs.godotengine.org/en/3.1/classes/class_tween.html#enum-tween-easetype
0, delay, in seconds
)
$Tween.start()