The statement has nothing to do with the establishment of religion.
It is however codified in United States Code 36 Section 302, titled "National motto"
This US Code states that “In God we trust” is the national motto.
The Supreme Court has ruled that this motto does not represent establishment of a national church. Therefore, it is not unconstitutional.
In 2006 the Senate confirmed that the motto "In God we trust" was the official national motto of the United States of America.
In 2011 the House of Representatives confirmed that the motto "In God we trust" was the official national motto of the United States of America.
In 2012 polls conducted by several independent newspapers and media outlets confirmed that more than 90% of Americans support the inscription "In God We Trust" on U.S. coins.
Your question is typical of one directed to undermine United States national heritage.
It is intended to divide the nation through propaganda focused on inflaming radicals.
Evil continues to grow through such propaganda in an attempt to destroy the USA.
This evil is confronted by honorable patriots who spread the truth rather than invoke exaggerated and false accusations.
God Bless the USA