1. Japan and the US were at a state of war, on that Japan started. Civilian deaths were expected in that day in age. We didn't have precision strike capabilities yet.
2. We honestly didn't realize how powerful it would be. Even though we tested it (in the middle of nowhere), it was still a shock. An act of terrorism requires intent. And while we DID intend to drop the bombs, we couldn't have intended for it to do what it did without knowledge that it would do it.
3. Dropping the bombs likely saved hundreds of thousands, if not millions of lives, both American and Japanese. A ground war in Japan would have been devastating to both sides.
4. It was clearly used as a military tactic and not used to specifically to strike fear in the civilian population.
5. Had they had the technology, they wouldn't have hesitated to use it on us. Indeed, they were doing Kamikaze attacks on US ships. They had no regard for their own lives, let alone the lives of others. If anyone had the potential to be terrorists in the Pacific WW2 Theater, it was the Japanese.
All that being said, America IS one of the biggest terrorist nations in the world. But it would be intellectually dishonest to claim that our attacks on Hiroshima and Nagasaki would examples of such. Policy AFTER the attacks (likely inspired by the power the bombs gave us) lead to us being the biggest supporters and perpetrators of terrorism.