The best option to clean a pallet is undoubtedly to use a water pressuzired machine, like a Karcher, is the easiest way to clean a pallet quickly, in any case if we don’t have one we can always use a hose if we have enough water pressure. If we can’t remove the dirt with the hose we can also use a sponge a soap.
Some pallets are going to be used to build furniture that may be in constant contact with our skin, in that case it’s always a good idea to disinfect the pallet, especially if we consider that perhaps the pallets were previously in contact with chemicals! anyway in any case of doubt it’s always a good idea to disinfect them. To do this I recommend to mix in a bucket of water some liquid soap and bleach, then with a good sponge, like the ones used to clean cars, clean all the pallet surface. This process can be performed before or after you sand the pallet, but if you do it after sanding it, with any doubt it is going to be better disinfected.