To understand why a penalty is levied, you'll need to have a fair idea about the Settlement cycle and the concept of Margin reporting in India.
The settlement cycle in India for Equities is T+2 and for F&O is T+1. What this means is that when you sell Equities and receive money as sale proceeds, such sale proceeds can be withdrawn only on T+2 day. So assume you sold stocks worth Rs.1,25,000 on Monday, you would be able to withdraw these funds only on Wednesday (Monday - T-Day, Tuesday - T+1 Day, Wednesday - T+2 Day).Similarly when you sell F&O positions you would be able to withdraw these funds on T+1 day only.
The important thing to note here is that whenever you sell an Equity position or an F&O/CDS position, only on the respective settlement day the funds become 'YOUR' funds. From the time you sell till the time its settled, they would be considered encumbered funds.
Margin Reporting: Whenever you take a position in the F&O/CDS Segment, the Exchange requires all brokers to report the funds available for such positions taken by client on a client to client level. So if you buy Nifty Options for a lac, the Exchange would ask your broker of the availability of funds in your account and report the same to the Exchange. While reporting the availability of funds, your broker is required to consider only 'free' or 'unencumbered' balance. Any short reporting will attract penalty. So if your broker allows you to buy options worth Rs.1, 00,000 with only Rs.60, 000 in your account, the shortage in your account would be Rs.40, 000 on which a penalty is levied.
Specifically to the question you've asked, when you buy options on Monday and sell them on Tuesday, the credit realized from sale of these options would be realized only on Wednesday (T+1), hence while your broker is reporting margins to the Exchange for fresh buys you'd have made on Wednesday, he would NOT consider the credit realized from sale of options on Tuesday resulting in Short reporting and subsequent levy of penalty.
For e.g.: Let's assume you transferred Rs.90,000 to your trading account and bought Options worth Rs.90,000 on Monday, sold them for a value of Rs.1,10,000 on Tuesday and bought fresh options for Rs.1,00,000 on Tuesday.
Now when your broker is reporting margins, he would report sufficient margins for your purchase on Monday (Rs.90, 000) because you had cash in your account. However while reporting margins for Tuesday (you've made purchases worth 1, 00,000 from the sale proceeds of Rs.1, 10,000) your broker would not report any margin because the sale proceeds would be realized only on Wednesday. So technically you have no free balance in your account on Tuesday resulting in short reporting and a penalty being charged on your account.