You can do this:
a.connect("my_signal", b, "on_my_signal")
"a" is the node that emits the signal "my_signal", and "b" is the node whose script contains the signal handler method on_my_signal().
That statement can be anywhere in the scene tree, as long as "a" and "b" are valid references to nodes in the scene tree. My preference is to place the statement in the _ready() method of a node that's a common parent of "a" and "b", to ensure that "a" and "b" have been added to the scene tree.