My device is rooted and when I execute the su command it displays a dialog for superuser permission and adds my application to the superuser.apk list.
What does the superuser.apk do? Can I programmatically add my app to the
superuser.apk list without prompting the user?
No, you can not add yourself to list without user prompt.
That is the reason of superuser.apk – to show the user prompt to disallow evil applications gaining root access.