It depends on what time you arrive at your Hakone ryokan in the evening. But generally speaking, it doesn't seem like a great idea. I assume you're interested in staying at a place in Hakone that has onsen and gives you dinner and breakfast? If so, then you're going to want to get there right at check-in time or not much past it. And you definitely won't want to get there after 7pm. These places have limited dinner hours, generally something like 5.30p-8.30p if buffet or 5.30p and 7p if course meal. It's going to be difficult for them to accommodate you or difficult for you to enjoy if you arrive too late. Also if you're like me (and most people are), you typically go have a dip in the onsen before changing to yukata (which is optional btw) for dinner. Check-out time is mostly 10am, although some are 11am. These onsen ryokans are not cheap, so you're going to want to maximize your relaxation time from check-in to check-out. You do sightseeing before and after, but when I stay at a ryokan I stay put from check-in to check-out.
Also, lot of people feel that it makes sense to do Hakone en route from Tokyo to Kansai or vice-versa. You could do that. But it may be logistically easiest to do Hakone as an overnight trip from Tokyo. From Osaka, Kodama stops at Odawara, but they're slow. Most Hikari don't stop at Odawara, and no Nozomi does. It's also kind of a hassle having a rollerboard or something in tow as you ride different trains of Hakone. Easier just to leave most of your stuff behind with your Tokyo hotel's front desk for one night and just do Hakone from there. You could try to find a locker at Odawara station, but you can never bank on locker always being available.