As others have noted, your brakes probably aren't set up correctly if you can squeeze the lever so far that it touches the bar while the bike is stationary. That said, squeezing the brake levers while the bike is on a stand won't cause any more wear than normal braking would .
If you want to determine how hard to squeeze the brakes while on the stand, a good test is this: ride at a moderate speed in a safe environment and then try to rapidly stop. Your brake levers should not touch the bars, and (obviously) nothing should break loose. A properly adjusted rear brake should be able to skid the rear wheel (but it is considered poor braking technique to skid the rear wheel). A properly adjusted front brake should should be able to lift the rear wheel off the ground (you don't want to actually lift it, so use care). Try to get a feel for how much pressure you apply to the levers when you practice a panic stop and then apply a little more when the bike is on a stand.
Please note that it is unsafe to suddenly fully-apply the brakes (suddenly squeeze both levers as hard as you can) while traveling at speed. If your brakes are properly adjusted, you should be able to easily lock either wheel by pulling hard on the brake lever.
For the rear wheel this is less of a problem: You will simply skid the wheel, wearing down the tire. If you do this enough, or at a high enough speed or with a thin road tire, you risk wearing down the rubber to the innertube. If that happens, the tire will rapidly deflate and you will be riding on the rim (this is bad).
Locking the front wheel is a bigger problem: the front wheel will NOT skid. If you lock the front wheel, you will go over the bars and hurt yourself.
 Within reason, of course. If you're some sort of Olympic weightlifter, it's possible that you might squeeze hard enough to damage something. Also, if the brakes are "looser" after you squeeze really hard (ie, if you have to pull the lever farther, not harder, to make the brake pads touch the rim) then you are either squeezing too hard, or you need to readjust the cable and tighten the cable clamp on the brake.