Why and When the pg_stat_activity's most of the columns are null? Recently, I have noticed that when I query the pg_stat_activity for few users most of the columns are [null] (pgAdmin 4) in the result. 

Only thing I can see is datid, datname, pid, usesysid, usename, application_name, query, rest all are [null].

There is an interesting part here. When I execute

select * from pg_stat_activity where query = '&lt;insufficient privilege&gt;'


is returning same rows as

select * from pg_stat_activity where state is null


and same as 

select * from pg_stat_activity where client_addr is not null


What could be the reason for this?

(I am using RDS Aurora Postgresql 9.6.12)
That must be because you don't have permission to see these user's activities.

Statements can contain sensitive data, so they are only visible to superusers by default.

Some rows in pg_stat_activity also contain many NULLs because they belong to background processes.