My way is perhaps a little excessive but I know I have no hidden-grot ready to harbour disease.
1. Dismantle the boxes: care pulling nails or drawing the wood over the nails.
2. Remove all old nails, frame rails etc.
3. Scrub & scrape all surfaces to remove loose paint or old-grubby-creosote, beeswax, propolis, moth-shucks, moulds etc - don't foget to clean the joints. (I use jeyes fluid, a very-stiff nylon scrubbing brush & elbow-grease. Then wash down all surfaces and nooks & crannies with fresh water.)
4. Leave to dry then look for splits and repair or fill them with waterproof glue.
5. Reassemble using decking screws for the main joints.
6. Paint outer surfaces and mating edges with creocote (~£6 for a gallon which does a lot of hive boxes). Inner surfaces need no treatment - let the bees decorate that bit.
7. Leave to air & weather for a week or two before use.
OTT maybe but the nasty tarry looking boxes I inherited all look quite pleasingly tidy & workmanlike.
Obviously finishing with creocote is not to everyone's taste (or smell!!) so that is your choice. Its just cheap, lasting, gets into the joints/gaps /splits and effective.