Is it okay to go home on time?
Yes, given that you have finished your regular work and there's no urgent need for you to stay back and fix something, then yes.
I'm currently working for a company, and I just got a complaint from the boss that I always leave the workplace on time; usually a developer works late.
Seems your management has a twisted view of the productivity. Working overtime as a measure of productivity is not really a standard thing, rather quite the opposite. It's like trying to measure the efficiency of an airplane by it's weight.
Is it okay to leave work on time as a developer ?
In most of the cases, this is not only OK, but expected.
In other words, if you cannot stick to the normal work timing to finish something off, it shows either there's a problem with the planning / estimate or, the competency is not up to the mark.
Talk to your boss.
Ask them why they expect you to stay late?
- Is it like they are over-committing (on behalf of you or the team) and by asking you to stay late and put more effort to get things done, they are trying to project a higher performance output?
- Are they trying to enforce a stay-late culture thing (which is not good, anyways)?
- Is it that they expect you to just stick around with the rest of team, or are they actually expecting to extend your working hour to deliver more? That is, is the leaving time (clock in-out) important, or they expect you to work on something (over and above the assigned task) during that time?
- If they expect you to leave by 7 (instead of 6), are you allowed to come to office at 10 (instead of 9)?
Sadly, in some places (ex: India), many organization and management believes that by staying late employees display some sort of commitment and more productivity - but unfortunately that takes them nowhere. Enforcing and following these things usually lead to burnout and actually decrease productivity.
To sum it up: Show them that by leaving on-time, you're not falling short on your delivery. You are capable of completing your work assignment on time, and leaving only after your finish the tasks.
However, If this is a company wide culture and they do not seem to have a justification for you to stay late and ask you to do it just because everybody else does this, you may better off finding a new job where your time is actually valued.