I agree with the others that bloodwork and a fecal are indicated. What are you feeding and how much? How old is your mare?There are many things that can be added to a feed program to help a horse gain weight. We have rescued many horses over the past years so I am very experienced in getting a horse to gain weight. Once you know by bloodwork that she is healthy, just underweight and worming is done, you can do several things to increase a horses weight. Some things work better than others. It depends on the particular horse. I would really like to see a picture of your mare to get a better idea how bad she really is. Let me preface this by saying that I am not a vet, and you should always get a vets opinion before starting/changing a feeding program.
First off, they need to have access to quality free choice hay. An underweight horse can never have too much hay. You should divide up her grain feedings to at least twice a day. 3x a day is better. (personally, it's difficult for me to do 3 times a day because of my work schedule, so I only do two, but 3 is better if you can do it.)
A good quality grain is important too. Buy the best quality that you can afford. We use a 12/8 pellet that is my M-G feeds. (a local distributor) Stragedy is a good feed, so is omolene. I would have to know how much you are currently feeding before I could suggest an amount. Be sure to increase the amount of grain slowly. You don't want her to founder.
Additives. There are several things you can add to grain to help them gain weight. You could use a weight builder. We like to use one called Moorglo. You can also add corn oil to their feed, BOSS, or soaked beetpulp. Often products such as probiotics help, especially if they are older. You can use a paste, but I prefer topical. Probiotics are microorganisms that help a horse to fully digest and absorb their food. (similar to the cultures in yogert.)
I hope I have helped some.