How to make a digitally controlled power switch?
Updated after update of the question. Changes are regarding the zero-crossing  

The best solution for an incandescent lamp is an SSR (Solid State Relay) with zero-crossing detection. (Zero-crossing switching increases the bulb's life.) An SSR module is the most convenient, but they're not cheap.   



If you want to switch other (unknown) loads you better pick a random-switching SSR, i.e. without the zero-crossing circuit.  

If price is an issue you can better build the SSR from discrete components. Below is an example using the MOC3041 as opto-triac. Will cost about 2 euros.  

  

Again, the MOC3041 has a zero-crossing circuit. For other loads than an incandescent bulb use the random switching MOC3051.

Not as nice, but easier: an electromechanical relay:  

  

The transistor is needed because the microcontroller can't supply the required current for the relay, so you have to amplify this current.



About the zero-crossing: you may have noticed that incandescent bulbs always fail when they're switched on. That's because the mains phase can be near its maximum when switching on. Combined with the low resistance of a cold bulb this results in a high current peak, which may burn the filament. When you switch on a zero crossing you avoid these peaks.