What is the use of this diode in the circuit?
I guess it is used for short circuit protection and turning off the LM2576.
This circuit is for a buck converter. If you look into the working of the buck converter, this diode is essential for the purpose of voltage conversion.
What happens is that, during Toff duration, inductor current cannot change instantaneously, hence, a freewheeling path is required when the transistor inside the IC is switched off. That is why this diode is called freewheeling diode.
It is explained in the/a datasheet of the LM2576:
In short, the circuit you mention is a buck converter, and the diode is called a catch diode.
Below the excerpt: