Many builders apply glue to the joints of nestboxes before joining the panels with screws or nails. This certainly adds strength to the box, but is not necessary in most cases.
Cured glue does not expand and contract at the same rate as wood. In an outdoor environment, extremes in temperature and moisture hasten the ultimate demise of a glue joint.
If you do want to glue your boxes together, the best available are the aliphatic resins (Titebond III); urethane (Gorilla glue); and the various brands of construction adhesives. One caution when using Gorilla glue is that it expands about four times its original volume while curing. Clamping or securing the joints with screws or nails is critical when using this glue.
One advantage of not gluing your nestbox together is it affords you ability to remove and replace a nestbox panel in the event it becomes damaged.
A longer lasting, weather resistant seal will result from coating the joints with a thin film of caulking - either an acrylic or silicone. Because caulks are flexible, they will survive the constant expansion and contraction of wood. The seams between the roof and the fixed panels of the nestbox (as well as the inner roof if your nestbox has one) will definitely benefit from a caulked joint. Although there is no structural advantage to using caulk, the added weather proofing is a plus.
Caulking is indispensable in making repairs on nestboxes, especially on seams that may have opened up over time, or to seal the inevitable cracks that develop. Acrylic latex caulk, often called "painter's caulk", is relatively safe to use on the exterior of an active nestbox. Silicone contains volatile driers to help it cure, so use it with care on an occupied box.
Be sure to read and follow the instructions on any adhesive or caulk you plan to use, for your safety as well as the occupants of your nestboxes.