Try trotting, trotting is the best muscle builder. If they are only slightly under-weight then feed her hay and ride her a ton and if you trot more than anything muscle will gradually build up, it all comes with time.
Muscle will come through riding him, as far as weight gain, the easiest way would be to add soaked beet pulp and rice bran to his feed. They worked excellent, when fed correctly. I soak my between feed times. (I soak overnite for morning feed, and soak during the day for evening feed)
With the muscle side of things, if once you have figured out an exercise schedule for him he hasn't put on the muscle you wished for, there are feed supplements out there you can add to their feed, and with the conjunction of regular exercise it helps build up more muscle :)
How old is the horse?
Might be harder to put on the weight you want if he's an older type :)
Fat builds...... fat.
It also provides an extra sorce of energy.
And..... you'll need the right combination of vitamins and minerals to go along with them other two.
My suggestion would be a 14% pelleted feed which has a good vitamin/mineral package blended-in, plenty of hay, a mineral block and good-clean drinking water.
Once you provide the building-blocks, a regular excersize program will stimulate needed muscle growth.
That might sound like perty-basic stuff...but it's worked well for me.
I don't get too fancy with these things. Nature works real well on it's own.