Why and When the pg_stat_activity's most of the columns are null?
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.