I assume that you are asking about WWI since in WWII it was Germany that declared war on the US.
I would argue that, among the US's reasons for going to war with Germany, there were reasons that were justifiable and reasons that there were not justifiable.
The most justifiable reason was the reason of German submarine attacks on neutral shipping. It makes sense that America would have been upset by German actions that led to the deaths of American citizens. It is true that the British also prevented American ships from having freedom of the seas, but they did so with surface ships and therefore did not kill anyone.
The less justifiable reason has to do with money. A major reason why the US took the Allies' side was that the Allies owed the Americans much more money than the Germans did. Therefore, the US had a financial interest in having the Allies win. This seems like rather a mercenary and unprincipled reason to go to war.
A reason that was more in between was the Zimmermann Telegram. It was certainly provocative for the Germans to make that offer to Mexico. However, the US could easily have ignored it because it was not likely ever to happen.