Assuming your device is not rooted.
In this case, you have to make sure the app you want to retrieve is debug signed (not a 3rd party commercial app).
Then there are 2 ways to get the db and other files:
Way 1: See the content inside adb shell
Run below command:
adb shell
run-as [your app package name]
(above command will let you to go to /data/data/[your app package name] folder)
cd databases
sqlite3 [your database file name]
(this will start a sqlite3 prompt, you can do simple db browsing with it)
Way 2: Pull the file to local
Run below command:
adb shell run-as [your app package name] chmod 666 databases/[your databases file name]
adb pull /data/data/[your app package name]/databases/[your database file name]