Yes ammonia is good for cleaning windows.
However you don't want to use straight ammonia on your windows.
To use Ammonia on your windows to clean your windows mix the ammonia with some water and also mix in 70 percent rubbing alcohol and some dish detergent.
Then use the mixture of water, rubbing alcohol, dish detergent and ammonia to clean your windows to prevent them from streaking.
Using straight ammonia to clean your windows will leave streaks on the window which is not a good thing.
You can also use just some vinegar and water to clean your windows as well.
I use vinegar and water to even clean my TV screen, computer screen etc.