Sterile water is safe to drink because it's just water that we normally drink that has gone through a sterilization process to make it more sterile for things such as irrigation of our nasal passages etc.
The sterilization removes microbes and other germs and bacteria that could be in the water so the sterile water is likely more safe for you to drink than regular tap water.
Some of the minerals that our bodies need are removed from the sterile water as well so the sterile water is not as healthy for you to drink as tap water is.
But sterile water won't hurt you to drink it if you want too.
I've drank some leftover sterile water I had because it was about to expire and it was okay but not the tastiest.