Sharapova, 29, was suspended last March after testing positive for the banned drug meldonium at the Australian Open in Melbourne.
The Russian admitted to taking meldonium for 10 years for health reasons but said she was not aware it had been added to the World Anti-Doping Agency's list of banned substances in January 2016. Sharapova's ban was reduced to 15 months on Tuesday by the Court of Arbitration for Sport (CAS).
Dimitrov, speaking after qualifying for the last 16 of the China Open in Beijing, said: "If you do something, I mean obviously there are circumstances. And whoever does something deserves what he gets for sure."
The 25-year-old Bulgarian dated Sharapova for two years until they split in July 2015. He added: "I think tennis misses her. As a competitor she's just going to come back and she's going to be so hungry to play and excited and motivated."
During an interview on American television with Charlie Rose, Sharapova accused the International Tennis Federation (ITF) of trying to make an example of her by giving her a 24-month ban for testing positive for meldonium.
"I got 24 months but the ITF wanted four years," she said. "I went through an ITF hearing, in front of arbitration that was chosen by the ITF so I was in a hearing - knowing that the people I am speaking to were chosen by the people I was in a fight with. They call that neutral? That's not neutral. The Court of Arbitration for Sport is neutral and they've given me 15 months."
The court's decision means Sharapova can try to win her sixth grand slam championship at the French Open in Paris next May after returning to competitive action in April. Two of her five major crowns have come on the clay at Roland Garros.
The CAS judgment said Sharapova was not an intentional doper but that she bore some degree of fault.