Yes, the Terms & Conditions of a website or app can act as a legal contract between the owner and its users. However, there are guidelines how to properly enforce an online legal contract, such as getting consent from users, providing notices when updating the Terms & Conditions and so on.
No, Terms & Conditions are not required by law. Terms & Conditions can act as a legal contract (see above), but Terms & Conditions are not required by law for a website or app.
The major benefits for having Terms & Conditions are those limiting your liability, protecting your intellectual property (IP) and reserving the right to terminate or block access of abusive users.