Relay vs. Transistor?
Relays offer complete isolation between the activating circuit and the load.

They can switch AC and DC, and be activated by AC or DC.

They can be very robust.

They also have the advantage that one can often see if the device is actuated, and one can even hear the actuation in many cases.