Much of the answer depends upon what you are doing for the company, what your boss thinks, general perceptions of your work performance, etc.
I worked within the IT industry as a consultant where much of my job functions required after-hours systems and network changes. In this regard, working late was seen as a necessity. As well, many programmers that stay late can also be seen as focusing on code as much as any programmer that came in early. This, of course, does not apply everywhere.
Any perception has to be tempered with performance. Being a highly effective member of any team I was assigned to, after-all, this is why I was hired as a consultant, any perception of time was outweighed by effectiveness. For example, coming in late and working late could easily be seen as a reward to the environment.
The are many studies of how the brain works and people can often be put into different camps. For example, we obviously know about the A type personalities. However, what seems to get little respect is that some people perform better in the morning and others later at night. I happen to be one that is sharper and more effective in the evening hours. For example, I am a far more effective and efficient coder at night often working till 6am.
Some people who are early risers, often cannot understand why others are not early risers and can become judgmental as a result. I experienced one direct report that appreciated after-hour work, however, could not understand not coming in at 6am like he did. It was completely beyond his understanding. However, this direct report would leave fairly early and could not see that his presence was needed during business hours and that the company suffered as a result. The number of hours where the direct report could be effective to the company was actually short in light of the global demand.
Add to this, for some, the commute would be impossible. For example, in the area where I lived, for some locations, the commute was at least 1.5 hours for a 30 mile commute and that leaving early only made things worse. In this regard, making the effort to come in early only resulted in wasted time with no gain.
Be that as it may, I have always made myself available on-site, on-line, by phone, by e-mail, or other means fairly early in the morning. At one location, I would login from home and respond to e-mails, check systems, and solve problems before leaving for work. For me, it was always about the work, the company, what I had to do to ensure the best interest of the company, etc. Given that, no-one, I mean no-one could criticize my work ethic or how I managed time. For example, one fix that would normally have taken 30 minutes took much longer because the environment was poorly managed and the failed employee fired. I came in on a Sunday afternoon, outside of the SLA (service level agreement) hours, began the repair that took 36 hours due to previous bad backups. The repair required a full rebuild of the system from the ground up and porting of data with layering in portions of backups that succeeded. In the end, many employees were able to get back to work much faster than they would have otherwise given the SLA adding value back to the organization. I was in on time the next morning and filled out the rest of the week as normal. That level of service goes very far to alleviate any negative perception.
And that is the rub. While people will prefer early versus late and may be judgmental in the process, this can be offset by commitment, effectiveness, and honest efforts to accommodate the needs of the company.