If it's done by gravity, and you want to pull it, you can. It would be perfectly safe. Depending on the style, and on how it's tasting, you may want to leave it in the bucket longer. Up to you.
I usually allow time for most of the surface to clear of the floating stuff. This will keep more of the sediment from being siphoned into the bottling bucket. Typical amount of primary time for me is 18 to 21 days.