A positive attitude gives you power over your circumstances instead of your circumstances having power over you.
When a person encouters a problem, having a positive perspective of the situation will help that person solve the problem. On the contrast, a pessimistic person would be made even more pessimistic, since that person has a new problem to deal with - thus the problem has influence over the person.
Example: After a car accident that heavily damaged your car, you could stay positive and think "No worries, my car can be fixed and luckily I'm not injured." This kind of thinking helps you control the situation.
On the other hand, if you think "Oh no, my car is damaged. It's going to cost so much money", you are allowing the situation to make you anxious and worried. It's like the accident dictates how you feel and act. When you are worried or anxious, you might not think straight and get yourself into more trouble.