The US before this point had an interest to stay neutral. However, in 1917, Jan 16, the US was informed by the British Empire US to join the war since Germany would help Mexico regain land lost, the US saw that as a problem. This incited them to declare war (This event was known as the Zimmerman Telegram)
So in summary, yes, it was in the national interest of the United States to declare war in 1917