last I checked (way back on 3.x), this was technically only limited by the type of database you are using, since they have different max. lengths for textual columns. To be on the safe side, try using not more than 255 bytes (depending on character set / encoding, the amount of characters may be lower). But I know that we've had a silly 1000-character tag once on a customer test environment.
At some point query was fixed to limit the number of characters used to distinguish TAGs to 255 characters but the TAG can contain more characters in its name.
The TAG path query is limited to 255 characters by persisted value of the QName for the association - the name for the TAG can be longer. Previously TAGs longer than 255 characters would not have been found by query.