Solar lights can be attached to a deck in a few ways. One way is to use screws to attach the light to the deck. Another way is to use a wire or metal stake to insert into the ground and then hang the light from that.