You can sue both the tenant, who is your landlord, and the building's landlord as well, for illegal eviction and for the loss of your property. The ONLY way to legally evict someone, whether a tenant or subtenant, is through the courts; there is no right to simply change the locks, even if someone is late on rent. Also, even someone is validly evicted (which you were not), the landlord (or the tenant you are subletting from) may not dispose of or allow others to take the evicted tenant's property, but must safely store it for a time while giving the tenant a chance to recover it. You may therefore sue for compensation for the illegal lock out as well as for the cost of any properrty you lost. In terms of the value of the illegal lock out, you could potentially recover any costs you incurred (e.g. hotel/motel) and the value of the rental for the time you were denied it.