Whether or not a company you used to work for will be able to sue you after you've left its employ will largely depend on the terms of the contract you signed with it. Many employers write covenants into their employment contracts that restrict the activities of former workers after they quit. If you breach any of these, you could find yourself in the proverbial dock.
It's likely you learned a lot about your former company's practices, policies and technological advances while working for it, especially if you held a senior role. If your contract contained a confidentiality clause, you could find yourself in legal hot water if you blabbed a past employer's secrets to one of its competitors, or any other third party for that matter. Your former employer could sue you for breach of contract and damages, if it could prove your actions resulted in loss of revenue.
Your former employer could find it difficult to prove you were using knowledge from your old job in a new role. To this end, many firm's write non-compete covenants into their workers' contracts. These restrict ex-employees from working for a firm's competitors for a limited period of time, often within a specific geographical area. If you're the subject of a non-compete clause, your former employer could take out an injunction against you if it discovered you were working for a competitor covered by your contract.
Once you've settled into another job, you may be tempted to touch base with your former employer's customers or suggest ex-colleagues for vacancies that arise at your new firm. Doing so could land you and your new boss with a letter from your former employer's solicitors if your previous contract included non-solicitation and non-poaching covenants. Non-solicitation could be hard for your previous employer to prove if you work in a sales role and contacted its customers while working from a purchased data list. Non-poaching covenants often cover approaches from third parties, so your former employer could take action if your new firm approached one of your ex-colleagues through a headhunter or recruitment agency.
If you left your last job under a cloud and feel like letting of some steam about your former colleagues or the company you worked for, watch what you write about them online. Publishing unfounded slurs on your publicly-accessible social media pages could result in your former employer or one of your ex-colleagues suing you for defamation. Posting defamatory content online is just the same as publishing it in print, although the size of your audience could limit any potential damages a plaintiff would be able to claim.