Remodeling Floors and Closets
That depends on a couple of things the first being is it real wood or laminate? The second is are the closets in the same room as your plan on doing the new flooring? If the closets are to be in the same room I assume they will most likely have the same flooring. If this is true it would be easiest to get the floor in first and then proceed to do the closet(s). 

Does the closet have a door? Or is it a walk in closet?

Edit based on reach in closet:
Most of the time reach in closets don't touch the floor but sometimes have about a half inch base that rests on the floor. Based on what you have told me the closets would have the same floor as every where else and shouldn't be a problem. Good luck!