Do congressional hearings have any legal binding?
And, is lying during a congressional hearing illegal? Has anyone ever been convicted for lying to Congress?
Lying while under oath during a congressional hearing is perjury:
There are a two key statutes governing perjury you need to be aware of: U.S. Code sections 1621 and 1001 of Title 18.
Section 1621 covers general perjury, and stipulates that anyone who "willfully and contrary to such oath states or subscribes any material matter which he does not believe to be true" is guilty of perjury and shall be fined or imprisoned up to five years, or both. Section 1001 covers false statements more generally, without requiring an oath. The section stipulates that "whoever, in any matter within the jurisdiction of the executive, legislative, or judicial branch of the government of the United States, knowingly and willfully" falsifies or conceals information, including before a congressional committee's inquiry, may also be fined or imprisoned up to five years.
It is a matter for the committee to decide whether or not to require witnesses to testify under oath. An oath is common when the committee is acting in a quasi-judicial role, and during confirmation hearing (when a committee is considering the appointment of a member of the executive or judiciary).
For example, in the investigations into Watergate, or the investigations into the raid on the Branch Davidian cult, witnesses testified under oath.
At other times it is at the discretion of the committee, and in particular the committee chairperson. When a committee is not investigating a particular event it will seek opinions which would not be admissable in a court of law, and the committee would not then require an oath.
Note that congresspeople swear an oath to uphold the constitution. They don't swear to tell the truth. I'm not aware of any country that requires its legislators to swear to tell the truth.
If a witness does not swear an oath, they cannot be prosecuted for perjury. However if they could be convicted of "making false statements" which covers most interactions with the government (a crime that is normally used for people who file false documents with a federal agency) Scooter Libby was indicted of both perjury and making false statements.