I think it is quite safe to write the flute part up to B6, a competent high-school flautist should be able to play up to that note. For a professional orchestra, D7 should be the top limit, even though many flautists can play considerably higher than that. However, if you need to go that high, it is almost always better to add a(nother) piccolo part, than to torture the flautist.
When it comes to low notes, keep in mind that the flute's first octave (C4-B4) is always very soft and gentle, and works best in solo passages. In this low register, the flute can easily be overpowered by other instruments, so care should be taken to ensure that doesn't happen. On the lowest notes, beginner flautists often keep their lips too tight, leading to poor sound quality and intonation.
Flute's second octave (from around C5 to around C6, with a few notes more on both ends) should be very comfortable for every half-decent flautist. They should have no problem achieving great sound quality in this range, so if you are writing for a less competent orchestra, it may be a good idea to keep the majority of the flute's part around here.