Plea Agreements are so integral in the criminal defense system today. If it wasn't for plea agreements, the entire criminal system would most likely collapse due to all of the cases being set for trial. As such, plea agreements exist. Plea Agreements allow individuals charged with a crime to "take a deal" meaning, make a plea to usually a lower crime or a promise that certain jail-time or probation will be suspended.
That is usually where most cases settle. It is also usually good to have an attorney on board to help with the negotiations of the plea agreements.
Many individuals take a plea deal without first consulting an attorney which may lead to their detriment of taking a deal that really wasn't a fair deal.
Criminal defense attorneys help by looking at the evidence, your criminal history the factors involved in the crime and determine, first whether or not there is enough evidence that a crime was committed and second, whether or not the plea deal is fair in light of all of the circumstances. Usually, prosecutors are less likely to give any deals or favorable deals to individuals that have an extensive criminal history.
So now, in light of all of this and plea-deals, the question now is whether or not an individual has a "right" to a plea-deal. On the plain level, there isn't an absolute right to a plea-deal. If the prosecutor doesn't give any offers, there isn't any recourse for that. However, if the prosecutor does give an offer and the person's attorney doesn't communicate that offer, then there can be some problems.
An individual does have a right to an attorney. So if they did not waive that right and their attorney does not give tell them about a plea offer from the prosecutor, then they have a potential claim to their right to an attorney being violated.
The defendant has to prove that there was a reasonable probability that they would have taken the plea-deal that was offered them. The defendant would also have to prove that the plea-deal would have resulted in a lessor sentence. Also, many plea deals come and go. They are not set in stone. The defendant also has to prove that the prosecutor would have abided by the terms of the plea agreement and that the trial court would have accepted those terms.
Also on plea bargains, an individual can withdraw their guilty plea if they were not advised of collateral consequences by their attorney. For example, if their attorney failed to tell them that they may lose their gun rights, that they would have to register as a sex offender or that there are immigration consequences that would affect them, then they may be able to withdraw their guilty plea. However, withdrawing a guilty plea puts the defendant back at square-one with the original charge. It's not a get-out-of-jail free card.