Blackout curtains, depending on which ones you buy, can be highly effective at preventing light from getting into your room while you sleep. They can block out a variety of light, including streetlights, moonlight, and yes, even daylight if you're sleeping during the day.
Because of the extra layers, they can also help insulate your room from the outdoor heat as the sun shines through the window, helping lower the overall temperature of your room. Plus, because they have extra layers, they can also help muffle or lessen outdoor street noise.
However, their effectiveness really depends on the quality of the curtain that you buy and what the lining material is. In order to truly be blackout curtains, they should be made with multiple layers of fabric, including a back lining made of an opaque material, such as polyester.