Any way of not to render the pane in panel using custom module? I dont want to use PHP visibility rule  to add a custom condition but I want to hide a pane based on some condition. How can I do that?
What you're looking for is called a access plugin, those are how Page manager (and by extension Panels) control both access and visibility settings.

This question: What are Ctools plugin (content type, access, etc), and how does one create them? has a lot more details and implementation examples.