How to check the last time any table in database modified in ms sql server
This should give you the details about when was the last read/write performed on a specific database.
USE server_name;
GO

SET ANSI_WARNINGS OFF;
SET NOCOUNT ON;
GO

WITH agg AS
   (
       SELECT 
       last_user_seek,
       last_user_scan,
       last_user_lookup,
       last_user_update
FROM
    sys.dm_db_index_usage_stats
WHERE
    database_id = DB_ID()
        )
           SELECT
             last_read = MAX(last_read),
             last_write = MAX(last_write)
          FROM
      (
SELECT last_user_seek, NULL FROM agg
UNION ALL
SELECT last_user_scan, NULL FROM agg
UNION ALL
SELECT last_user_lookup, NULL FROM agg
UNION ALL
SELECT NULL, last_user_update FROM agg
      ) AS x (last_read, last_write);

Be aware sys.dm_db_index_usage_stats does not return information about memory-optimized indexes.  For information about memory-optimized index use, see sys.dm_db_xtp_index_stats.