What is normally done is the application is installed using the system's packaging tools. But you could write your own installer script as well. During the installation process, run as root, a new group may be created, and a new directory under /var/lib is created owned by that group. For example, the locate command does this:
$ ls -l /usr/bin/locate
-rwx--s--x 1 root locate 42032 Nov 17 19:33 /usr/bin/locate
And it's data dir:
drwxr-x--- 2 root locate 4096 Nov 15 2010 /var/lib/slocate
The locate command uses setgid feature to set its own process group ID to locate, that gives it permission to read the /var/lib/slocate subdirectory.
In your case you (your installer) would set write permissions as well so the app can write data there on the users behalf.