However good a person may be or however bad a person may have been, we cannot know what he or she is going through in the grave. The growing of a tree over the grave does not mean anything. There is not basis for this in authentic sources. It is not right to say so that if a tree grows on the grave then a person was righteous because it is not the sign of that. It is simply a false notion.
Trees can grow on a good persons grave and an evil persons grave too. We have seen trees growing on the graves of kuffar. Does that mean they were righteous? They too may have been good but not on faith.
Believing in such things is not good as these are just lies. We should not be deceived by the claims of the myth-makers and followers of deviant beliefs who claim otherwise. And Allaah is the One Whose help we seek.
May Allah protect us from evil and keep us firm in faith.