I've been riding my bike for about a year and a half now and the back spokes are starting to snap, 2 now. I want to know when was this bike bought from the original owner since the spokes are stock spokes and it is second hand, it would be easy to know. All I do is just wheelies and bunny hops so maybe it might wear off more faster. Also, should I replace the spokes asap?
From the info you've given it's hard to tell how old your bike/the spokes are.
If the spoke tension is too low/if there is too big a difference in the tension of the spokes in the wheel this can cause premature spoke failure due to uneven force distribution over the spokes in the wheel. Make sure to have proper spoke tension/tension distribution to prevent premature spoke failure.
To answer your other questions:
1) Yes the wheels will not last as long when doing bunny hops and other such 'stunts' (such as riding down stairs, jumping off things etc.)
2) You should replace your spokes as soon as possible, if you don't and keep riding there is a significantly higher chance of more spokes braking (since the force is distributed over less spokes)
In my experience, the wheel's build quality is key, and it has to be strong enough to support your weight plus whatever cargo you carry. That includes having a good quality rim that's straight out of the box, and it includes even tension on the spokes. (In the case of the rear wheel, the drive-side spokes will all be at a much higher tension because the wheel is dished, so I really mean the spokes on each side are even in tension). To my knowledge, most wheels are built by machine and finished by hand. The stock wheels on a lower-end bike may not have been finished as well (e.g. tensioned evenly) as on a higher-end wheelset. Also, the original owner might have hit them.
Wheel strength is determined by the rim and the number of spokes. The gauge (thickness) of the spokes may not matter as much in terms of strength. I'm not familiar with 26" mountain bike wheels, so I have to give an example of my own road bike's wheels. I'm about 135 lbs (61 kg), and I have 20 spokes in front and 24 at the rear. People who are 180 lbs (81k kg) would probably want 24 spokes front and 28 rear at minimum, assuming the same rim. If a heavier rider took my wheels, they would go out of true faster, and possibly they would be more likely to break spokes. The rim involved is a pretty strong 30mm aluminum one. You could get a shallower and lighter one, but then most riders would want to increase the number of spokes.
A possible factor is the tire. Tires offer a bit of cushioning. A 23mm road tire offers a lot less comfort over bumpy roads than a 28mm one. You mentioned a 26" wheel, so I assume you have a big tire, but it might be worth mentioning for completeness.
If you have a well-built wheel from components that are good enough, then barring manufacturing defects, you should be able to wear the rim out without breaking spokes. If all you are doing is bunny hops and wheelies, and your technique is good, then I don't think that should stress the wheel too much (disclosure: it should be obvious that I'm a roadie, and I don't do wheelies or real bunny hops). Again, I would suspect that you'd wear the rim out first. I've had one pair of road bike wheels for 7 years before the rims were worn a bit too thin for me to trust. I had another pair for 5 years. The rims are actually still good, but the hubs are not quite sound (issues with a proprietary bearing, and the manufacturer went out of business).
Your spokes are breaking because of your rim. You have already broken one spoke, your rim just suddenly got yanked to one side. Fitting a new spoke is a monkey patch on a cheap rim, and a temporary solution on an expensive rim, at best.
The reason for this is that now the rim is essentially permanently warped, spoke tension will be all over the placed and uneven, they will continue to break until your replace the rim + spokes. Tensioning the wheel won't do a thing.
The only exception is on carbon rims, where they basically can't warp, they just right out snap.