Really great question as I am sure that many have the same question as well. So basically doing well on AP and SAT subject tests mainly matters to those who either 1) want to enter college with college credit or 2) are applying to very selective schools. If you fall into either of these two categories then you should definitely try your best on these exams (even if you aren't applying to a selective school, doing well will set you apart from most people). When I was in high school, I scored well enough on 4 AP tests that I entered college with a semester's worth of credit and was thus able to not only able to study abroad, but I also graduated a semester early!! AP scores grant you flexibility in your schedule by giving you credit or putting you in the more advanced class, if this sounds like something you want then you should definitely try to get a 4-5 on your AP exams. AP exams will save you money in college as well because you won't have to take as many classes. Overall, while studying for AP exams may not be the most fun, the benefits of doing well will: save you money, allow you more flexibility in your schedule, and enable you to take the classes that you actually want.
Now SAT subject tests are a little less applicable than AP exams. The college that I ended up attending heavily recommended that I take at least two SAT subject tests; it was not mandatory to take these exams but those who did not were at a disadvantage compared to those who did take these exams. Taking an SAT subject test and doing well shows that you are capable of going above and beyond what is required and that you are a hard worker. It is a good idea to take SAT subject tests even if the schools you are applying to don't mention/require them as doing well can only help your chances of being accepted. These exams don't grant you any credit and also do not pass you to the next level to my knowledge.
I hope this helps and I wish you the best of luck!!