1. What day is July 22?

- It is Sunday.

2. What day is on July 22?
- It is Sunday.
==============
Which one is right?

3. On July 22, Sunday, what did they do?

4. On Sunday, July 22, what did they do?

5. On July 22, on Sunday, what did they do?

6. On Sunday, on July 22, what did they do?
===========
Which question is grammatical and commonly used?

1 is correct; 2 is not.

Among the others 4 is best.
3 would work in you added "a" in front of "Sunday."

In 5 and 6, repeating the word "on" is unnecessary.