You can lightly mist neem in flower up to the end of week 3 when the buds start to put on some mass.

If you give less than about 3-4 weeks between neem app and harvest you risk unpleasant tastes, although it IS safe to humans.

Do not overapply, and raise the lights for 24h after any pesticide app that you are unfamiliar with.