The basic rule is set out in Virginia Rule of the Supreme Court 3A:8(c)(5):
(c) Plea Agreement Procedure.This language clearly forecloses the use of statements made by a defendant during plea negotiations from being used in the prosecutor's case in chief. But see Hood v. Commonwealth, Va, 2005, No. 040774 (can be used to impeach, rebut, & cross examine) & Ayla v. Aggresive Towing, Va, 2008, No. 071451 (unwithdrawn plea may be used against 3d party witness). However, the language also seems purposefully ambiguous. It could be restricted to only defendants if only written slightly differently
(5) Except as otherwise provided by law, evidence . . . of an offer to plead guilty or nolo contendere to the crime charged, or any other crime, or of statements made in connection with and relevant to any of the foregoing  offers, is not admissible in the case-in-chief in any civil or criminal proceeding against the person who made the  offer.
(5) Except as otherwise provided by law, evidence . . . of aThe failure to denominate one party for whom the protection exists seems to indicate that this Rule was meant to apply to both sides, that "offer to plead guilty" simply means a plea offer proffered by either side, and that both sides are forbidden to talk about plea offers in their case at chief. There's no other explanation for not simply stating this is a protection for a defendant. As a practical matter, I'm not sure the prosecution would often need this protection during the defendant's case in chief.
ndefendant's offer to plead guilty or nolo contendere to the crime charged, or any other crime, or of statements made in connection with and relevant to any of the foregoing  offers, is not admissible in the case-in-chief in any civil or criminal proceeding against the person who made the  offerdefendant.
So, the parameters discovered so far are (1) no discussion of statements made during failed plea negotiations during cases in chief, but they can be used for (2) impeachment, (3) cross examination, and (4) rebuttal. Still, that's only during the guilty/not guilty part of the trial. What about during sentencing hearings?
Well, 19.2-295.1 governs the jury sentencing hearing. Per the statute, the Commonwealth may introduce victim impact statements and shall introduce the defendant's prior record. Then "the defendant may introduce relevant, admissible evidence related to punishment." The prosecution has a pretty solid definition as to what it can introduce during its sentencing case in chief and it does not include statements made during failed plea negotiations. The question for the defense is basically, what is relevant? In Commonwealth v. Shifflet, Va., 1999, No. 90187, the Virginia Supreme Court explained relevant as follows:
The kind of evidence contemplated by § 19.2-295.1 bears upon the record of the defendant and the nature of his crime. Evidence of a good previous record, and extenuating circumstances tending to explain, but not excuse, the commission of the noncapital crime is admissible mitigating evidence.It seems unlikely that a defendant would be able to fit a statement made by the prosecution during failed plea negotiations under either his record or the nature of his crime. However, 19.2-295.1 allows the prosecution to introduce "relevant, admissible evidence in rebuttal." Per this section of the statute, if the defendant got on the stand and testified "Bob" did it all any statements he made during plea negotiations which contradicted that would be available to rebut his statement.
However, a sentencing hearing held by a judge isn't covered by 19.2-295.1. In fact, I can't seem to find a statute authorizing an actual sentencing hearing by a judge. The only things which seem to exist are rules regarding presentence reports, a requirement of sentencing guidelines, and a requirement that the judge allow the defendant to make a statement before pronouncing the sentence. Despite this, the reality is that judges do have sentencing hearings, calling on both sides to provide evidence, whether they are authorized to do so or not.
It stands to reason that evidence introduced in a judicial sentencing hearing would be limited just as it is in a jury hearing. However, there's a second consideration when either the defendant or the prosecution tries to introduce statements from plea negotiations during a judicial sentencing hearing. Virginia Supreme Court Rule 3A:8(c)(1) authorizes plea negotiations, but also states
In any such discussions under this Rule, the court shall not participate.As long as both sides stick to trying to convince the judge as to what an appropriate sentence would be, the hearing should be okay. However, the second the parties start talking about statements made during the plea negotiations they are effectively turning the judicial sentencing hearing into an extension of the plea negotiation in which the Court is forbidden to participate. It can be argued that even a regular judicial hearing would be an extension of the plea negotiation, just without open discussion of the failed plea negotiations. However, in that case all judicial sentencing hearings in which either side provided evidence would be invalid under 3A:8(1). It's logical, but it assumes that some sort of plea negotiation took place. In a hearing wherein one of the parties tries to introduce statements from plea negotiations there is no assumption.. In such a case I think the judge is required to stop the party as soon as he realizes what is going on and require the party to not discuss the plea negotiations in the hearing.