Wikipedia says "The English word "holy" dates back to at least the 11th Century with the Old English word hālig, an adjective derived from hāl meaning "whole" and used to mean "uninjured, sound, healthy, entire, complete". The Scottish hale ("health, happiness and wholeness") is the most complete modern form of this Old English root."
As St Margaret was an 11th Century princess (then queen) who was reknowned in her own time for her personal qualities, as well as for her piety, the term as used in her case is very apt.
These days it seems to be used in a religious context - probably by osmosis as the church became the arbiter of what is good and wholesome and what is not.
It is, of course, completely possible for the non-religious to be sound, complete and wholesome, though believers often ascribe their morals to the precepts they learnt with their doctrine.