I find solid state relays (SSR) very convenient, especially for controlling AC power lines. They typically include opto-isolation and zero crossing detection (explained later.) Also, they can be controlled with as little as 3V. This means that you can connect them directly to a GPIO pin. However, I still prefer to put a transistor in between to prevent drawing too much current from the GPIO.
All these features do come at a price. The typical SSR that I use costs about $10. PC board mounted SSRs that handle small current can be as little as $1 each. The 40amp SSRs that I used to control the heater for my hot tub cost about $25. (I will describe that project in a later post.)
There is an important point you need to know about when using SSRs - the AC and DC versions are not interchangeable. When switching AC current, the relay should only turn on or off when the voltage is at zero during the AC cycle. This is what "zero crossing detection" does and it prevents a large surge from entering the device you are controlling. I have used a DC SSR to control a lamp and blown the bulb due to the lack of zero crossing detection. Also, if you use an AC SSR to control a DC load, it will turn on just fine, but it will never turn off since the SSR never detects the load voltage crossing zero. This has confused many a hobbyist and now you won't be one of them.