Prolonged exposure to dampness will cause a wooden window box to deteriorate and break apart. To extend their lives, put the soil and plants in a liner that fits inside the window box. Liners can be made of sheet copper, galvanized tin, or even plastic.
Ideally, the liner will have at least two small holes in the bottom that will let water drain out. There should be matching holes in the window box itself that will let the water out; if the water simply pools in the bottom of the window box, there's no advantage to using a liner.