I am trying to find a solution how to make a case record read only if the Case status is equal to closed. Can it be done?
One solution would be to update the RecordType of the Case when it's Status field is updated to "Closed". You could do this using a Workflow.
This record type could then use a Page Layout that has it's fields set to "Read Only" at said Page Layout level.
Alternatively, you could use a Trigger to use Approval Process style locking to restrict the record based on the Status field. This was introduced with Winter '16.
You can take this approach:
Create a page layout and make all fields readonly on this page layout. Create a recordtype and assign this recordtype and page layouts during Case closure by workflow field update or from Process Builder. This is from UI level restriction.
To restrict data being updated from API or data migrations etc. create a trigger and verify the Case status from Trigger.old and throw an exception if record is being modified.
You could also create a validation rule that would stop your users and the API user from editing the record.
It's a little quicker than the record type/page layout method. However, validations are cruel in that it will stop any user that does not meet the criteria. So if you have a need that something still needs to edit the record like a API user then the layout will work. If you want to lock it down to anyone try the validation.