Generally hidden files and folders (with the preceding . ) are indeed hidden for a specific reason, commonly to prevent them from being deleted by unknowing or over-zealous users. Most data that's not vital are dumped in an app's cache while things like saved settings, configuration files, and user I.D. and password get stored in those hidden folders.
Sometimes there's the matter where a user wants to delete an app completely and during the process its hidden folder isn't deleted so those might accumulate after a while, especially if there's been a lot of activity installing apps and later uninstalling them. In that instance you might be able to just delete that folder manually using a file manager app, but this also depends on where it's located, you'll only have full access to things residing in the user data partition. Unless you're rooted, you won't be able to do anything with files/folders in any of the system-level directories anyway.