Nails have been used for many, many years. They are fast, cheap and easily located and easy to repair boxes if they're not too heavily glued. If you don't have a power or air stapler, it's the way to go. Screws take longer to assemble, but can be easily removed for repairs. If you have just a few boxes to assemble, either of these work well. Nails work better than screws on the frames because of the small pieces of wood, so why multiply the fastener choice?
I have only a half-dozen hives and I've tried both the above options. but I have a small compressor and a pneumatic stapler, so now it's my only method. A bit of Titebond II wood glue, and zip-bang, I have a new box, a few more zip-bangs and I have new frames. Works well for just a few boxes and frames or for many.
If you have more than a few boxes to assemble it would be worth your time to locate the ideas for box and frame assembly jigs on this forum.