The size that works best is 12 inches deep, 12 inches wide, and 12 inches tall on the the side that connects to the inside of the chicken coop.
The nesting boxes should have a sloping top. It should slope down to end up just below the roosting perch.
You should provide one nesting box for about every four hens.
You should alos provide roosting perches for the hens to sit on.
You can use exterior grade plywood or plastic. Plastic chicken nesting boxes are gaining in popularity due to their ability to last longer.