It depends on the type of bonus. Statutory bonus (now under the Code on Wages, 2019, which replaced the Payment of Bonus Act, 1965, for employees within the wage ceiling) for an accounting year in which the employee worked at least 30 days must be paid within eight months of the close of that year, and resigning does not forfeit it; it can be disqualified only for dismissal for fraud, riotous or violent behaviour, theft, misappropriation or sabotage (Sec 29). A performance bonus or appraisal increment is contractual and depends on the company's policy: if the policy says it is payable only to employees on the rolls on the payout date, the company may withhold it after resignation, but if it was earned for a completed year and the policy has no such condition, you can claim it. Ask HR in writing for the policy, and send a legal notice if it is wrongly withheld.