I want to know after how many ledger lines should you start notating music with the 8va symbol. I have read that the flute often has music written on ledger lines. So up to how many ledger lines can a flute read? And what about the other instruments?
Flute or violin players can read as many ledger lines as you want, but extended passages in the very high register (A6 and above) are often easier to read if you use the 8va symbol. Once you get to six ledger lines then 8va is almost always a good idea. This is a typical example of appropriate 8va use:
The same goes for low brass players in the low register.
Be aware that woodwind, brass and strings players nearly always need different fingerings and different muscle tension for higher notes, and notating the notes at pitch gives them more of a "feel" for the music. You should only use 8va when it does make the music easier to read. The high trills from my example written at the correct pitch give the player a cue to provide enough breath support to get those high notes out.
For keyboard players you can write 8va (or 15ma) any time you want.
The basic idea of staves is to keep as many dots as possible within their confines. That's one main reason alto and tenor clefs work well for the particular instruments they are used for.
Once a piece goes out by three or four ledger lines, that's fine if the music then gets back to within the stave concerned. However, if a passage stays outside, using around five or six ledgers, there seems little point in using all those leger lines when 8va/vb and in extreme cases 15va/vb can be utilised instead. Not only does it make things easier to read, keep it neater, but probably you'll get more staves on a page.
Pianists have to cope with octave marks a lot, thanks to their instrument having such a huge written range.
How many leger lines are OK without using an ottava bracket? For me, up to 4 is no problem. Beyond 4, it gets trickier, but there's a common piano idiom where large numbers of leger lines are not so bad: octaves. Octaves are very common in piano music, and pianists are used to recognising them. If a passage in octaves entails tall stacks of leger lines for the "distant" notes, that's not so great a problem, because you can just read the "near" notes, knowing that the "distant" ones are an octave away.
Consider the notation for this fragment of Chopin's etude in C, op 10 no 1:
This is a study in changing the position of the RH rapidly, and playing wide broken chords in the RH. It helps to have the note-heads indicate the general positions of the keys played by one hand in one position. But the start or finish of an ottava bracket disrupts that line and makes it harder to read the notes and work out when to change hand position. I think the first bar above would be better notated if its last note but 3, E6, were not under the ottava bracket (i.e. the bracket had started after that note); that way, the notes C5 G5 C6 E6, which are all to be played by the RH in the same position, would all have come before the ottava bracket, and the shape of those 4 notes together would be easier to see. In that case, the mental jolt of going from notes with no ottava to notes under the ottava bracket would have been less bad, because the hand changes position anyway. Compare the start of bar 2, where the bracket ends just when the RH changes position, and it is easy to see that the shape of that bar's 1st 4 notes is the same as the next 4.
The publisher seems to have followed the convention that it's better to put a beamed group either entirely within, or entirely outside, an ottava bracket. That might look nicer but it's less convenient for the pianist.
(BTW, look at that metronome mark!)