Question: So I was searching a room to rent and I found a landlady in an email group. We first talked over the phone, then she sent the photos of the place over text message and we continued talking with messages. I said at some point "I want to rent the place, let's sign a sublease."

She agreed to prepare the documents but then didn't return to me with a document for 10 days. In the meantime, one of my friends offered me a free room so I wrote in a very kind language that I decided not to rent the place. (I am a foreign student in a lab rotation here so for a person not having salary it is a big amount.)

She replied using very strong words and because of that I didn't even bother to reply her. We didn't have any signed document so I was very sure that nothing could happen. 4 days after she wrote me another message saying that she wants the money sending a link to a law firm website saying text messages can be relevant.

The sublease is for 2 weeks and the rent is just 300 dollars. And I am leaving the country in 3 weeks so if her lawsuit request is accepted, I may not be able to go to court. Should I be worried?

Answer: 
To answer the headline question: yes, text messages are as binding as any other form of communication. They are on par with any other written communication like a letter or email and are better than a verbal communication because they create a permanent record.

To answer the subtext: you probably don't need to worry about being sued. Because the terms of the contract were not fully defined (a sublease document needed to be drawn up), these text messages probably do not create a contract. All they do is prove that you were negotiating a contract - negotiations can break down for all sorts of reasons.
You don't say where the property is located which is always relevant in determining the law that applies.

But, while a text message is just as legally binding as a signed letter, it isn't clear that a contract was formed.

> 
> "I want to rent the place, let's sign a sublease" She agreed to prepare
>  the documents but then didn't return to me with a document for 10
>  days.
> 
> 
> 

If she replied by text message, "It's a deal, consider yourself my subtenant." Then you would have a binding agreement. But, instead it would be fair to interpret what she said as, "since you said you are interested, I will make an offer to you soon which you may accept or reject."

It doesn't make a lot of sense to try and sue you over $300 and to do so, should would need to have a process server hand deliver a summons and complaint to your personally. If she manages that and you don't make a timely response, a default judgment would enter against you for $300 and court costs which she would be hard pressed to enforce against any assets you own. If she doesn't manage to serve you with process, her case would be dismissed.

Whether or not you should be worried, knowing that, is up to you.