I got a mail saying "your response is required by law". They ask me to go to my2020census.gov and fill out survey. I understand it is important. Yes it helps community yadayadayada. From the legal standpoint (not moral, ethical or whatever), only legal point of view, what will happen if I ignore it? Is it illegal?
In reality, nothing will probably happen. There is no record of anybody being prosecuted for ignoring the census since 1970 (as of 2014, the article hasn't been updated since then).
(a)Whoever, being over eighteen years of age, refuses or willfully neglects, when requested by the Secretary, or by any other authorized officer or employee of the Department of Commerce or bureau or agency thereof acting under the instructions of the Secretary or authorized officer, to answer, to the best of his knowledge, any of the questions on any schedule submitted to him in connection with any census or survey provided for by subchapters I, II, IV, and V of chapter 5 of this title, applying to himself or to the family to which he belongs or is related, or to the farm or farms of which he or his family is the occupant, shall be fined not more than $100.
(b)Whoever, when answering questions described in subsection (a) of this section, and under the conditions or circumstances described in such subsection, willfully gives any answer that is false, shall be fined not more than $500.
(c)Notwithstanding any other provision of this title, no person shall be compelled to disclose information relative to his religious beliefs or to membership in a religious body.
The entire 13 USC Chapter 7 deals with offenses and penalties related to the Census:
13 USC Chapter 7, you as a citizen would fall under sub-chapter 2 "Other Persons".
If you don't submit your answers, the Census bureau will send out a person to collect your responses. How you behave with that person may be more of an issue with regards to your liability.