I think you want it to grow as long as it will do without it going to seed. If it has gone to seed you end up with dusty hay. The actual length of grass will depend on the type of grass mostly.
Our grass doesn't grow very tall but there is a lot of it, so we get a lot of hay off our field. On the other hand our friend over the road from us has very tall stalky grass, and has very few bales from his field!
Usually, you would leave it to grow until mid to late June. We usually wait until there are some seedheads on the stalks, but try to cut before they shed.
Having said all that, the weather is usually in charge of when to make hay!
Depending on the grasses you wait until the seed heads have just formed and swollen. Make sure that ragwort has been pulled from the grass and any other objectionable weeds such as Thistles and Docks.