Most hives come with nails. But basically 7p or 8p nails will do for hives. Galvanized would be better than not. Ring shanks would be better than smooth. Screws would be better than nails. If you use screws, buy deck screws 2" long and buy a pilot bit to countersink them and drill the pilot hole. I staple mine with a 1/4" crown stapler and 1 1/2" staples.
Frames are another matter. You pretty much need to buy your nails from the bee supply places as they have them small enough and thin enough. I staple them with 1" staples in the 1/4" crown stapler.