Is there a limit in bits for the data hashed in hash-locked script? What is the limit in bits for the plain-text data of a secret (the data that it is actually hashed and used in a script) in a hash locked contract?
The maximum number of bytes pushable to the stack is set to 520 bytes, so that would be the maximum plain-text data of a secret (if you want to be able to redeem the output afterwards).

Another question discussing about this limit can be found here.