Computer-security-software maker Symantec Corp. has agreed to acquire LifeLock Inc., a seller of identity-theft protection services, for $2.3 billion in cash, the companies said Sunday.

The deal will value LifeLock at $24 a share, a 16% premium to its Friday price of $20.75, near its 52-week high.

The deal broadens Symantec’s portfolio at...