Trump has the authority to declare a national emergency, but Congress still has the right to vote against that declaration.
Also, he is moving funds around --- that is what I think is going to be in question. I believe we have a national emergency on our hands and a crisis at the border and give Trump a pat on the back for doing what he can to remedy this situation, but the Constitution states:
Article 1, Section 9, Clause 7: "No Money shall be drawn from the Treasury but in Consequence of Appropriations made by Law; and a regular Statement and Account of the Receipts and Expenditures of all public Money shall be published from time to time."
So, if monies have been appropriated by law to be used for other means, does he have the authority to do so?
This I believe is what the courts are going to have to decide.