If it's wool or a wool-like synthetic, 3-4" is plenty. Any longer and you'll find the fringes getting all tangled and ratty.
If it's a lightweight silky yarn or blend, you can make long, floppy, romantic-looking fringes.
If it's cotton or linen, I don't think I'd fringe it at all.
If the yarn you're using makes fringes that don't hang nicely, you can use another yarn for the fringes.
It's also a matter of proportion. A very long fringe on a short scarf will look strange. And vice versa. As MaryKZ says, try several lengths and see what looks best to you.
Or find a pattern for a fringed scarf of the length you're making and see what it recommends.