What is the material? MDF, plywood, or particle board?
I recommend you use glue AND screws for two reasons.
1. Glue is strong, but screws provide a mechanical connection.
2. The screws help provide good clamping pressure while the glue drys.
The material is important, because MDF for example does not take screws well, or if you try to glue melamine coated particle board, it might not bond well.