I believe the OP is talking about the cached data that is listed under storage in settings.
OP, yes it is safe to clear. It will fill up again as you use your apps. It helps your apps to function more quickly but if the cached data it is using is old, you can sometimes experience problems in apps and clearing the cache is good in that instance.
If you are just trying to clear space on your phone, it's just going to be used again as soon as you use your apps. If you have uninstalled apps or stopped using apps, however, then the cache for those will clear some space for you.