If i sell call or put option on last date of expiry, but the premium increases but nifty closes below my strike price, will i be in profit or in loss?

Your question is incomplete.

Assuming you Sell a Call option of Nifty 8600 with 20 rupees premium on expiry day.

You will get the 20 rupees to your account.

If premium increases to 25 or 30 during trading hours, dont worry about.

At the end of the day, if Nifty closes below 8600 (closing price not LTP), then you will be in profits, you can keep all the 20 rupees you received earlier.

The numbers are just an example.