1. To make code easy to understand It can be used to elaborate the code so that the end-user can easily understand the code.
2. To avoid unnecessary code It can also be used to avoid the code being executed. Sometimes, we add the code to perform some action. But after some time, there may be a need to disable the code. In such a case, it is better to use comments.