I recently read "Four Years In The Stonewall Brigade", by John O. Casler. The author grew up around the area where the Virginia / West Virginia border was created and had some pretty direct accusations regarding The Baltimore and Ohio Railroad. His accusations are here in the 3rd paragraph.
When the First Wheeling Convention met in June of 1861, their idea of what "New Virginia" would look like was indeed smaller than what it is now. The delegates were also from there, the northwestern counties. In the later Second Wheeling Convention, the lines were shifted towards the Blue Ridge, which seemed to be a natural boundary. But the addition of the Panhandle counties was a sticky issue. The railroad connections were indeed very important to the state's economy, and the removing of the railroad from the Confederacy was also attractive. But, there was spotty local support for this: those counties were mostly Confederate in sympathy, their culture being much like the rest of the Shenandoah Valley. And, not surprisingly, no delegates from those counties ever appeared at any of the Wheeling Conventions or the Constitutional Convention that set up the framework for the new state- the area was contested by northern and southern troops until 1864. Any delegates to the Wheeling Conventions would have had to get past Confederate soldiers. In the Second Convention in 1862, after some discussion and arguing, it was eventually decided that the voters of these counties would be allowed into the new state "whenever" they voted to be included. A constitution was written and approved- without a vote being taken in the Panhandle. When a statehood referendum was held in Jefferson and Berkeley Counties the next year, in May 1863, there were Union soldiers fortuitously present at the polls, so whatever voters dared to present ballots voted for inclusion with WV. Perhaps if the Confederacy had held the area for a vote, it would have gone the other way; but "whenever" meant that, in effect, there only had to be one yes vote, and they were in. Voting no ( like when Lee's army came through a month later on the way to Gettysburg) would not have mattered. There'd been one vote yes. And the US Congress agreed with it.
Casler's sentences are a little unclear, but he seems to be implying that the B&O Railroad itself got into the political discussion and bent the Convention to its will. It would not be surprising if someone from the railroad had had some influence- perhaps there was a question of the railroad being taxed by three states instead of only two. If Casler has got some sources for that, it would be nice to know and follow up on that. But: you really don't need to assume B&O meddling had to be there: WV had sufficient good reasons to want the railroad.
The inclusion of the Eastern Panhandle has always been a little controversial, because the population there really did mostly want to go with the South. After the end of the war, Virginia would actually go to the Supreme Court, to try to get back Jefferson and Berkeley Counties. In Virginia vs West Virginia the Court refused, citing the "whenever" vote, and basically agreeing with the Congress.