Before anything else: Don't walk. Run.
There are almost certainly details of this story that you have omitted, or that you have unintentionally embellished, or that you are unaware of, and clarifying those details here would be inappropriate. What is clear is that your relationship with your advisor is completely broken. Get help, and get out.
Q1) Wont the paper count towards her tenure if she wrote it with a graduated student or will it count towards higher credit if she is the sole author?
All publications count toward tenure, whether solo, with colleagues, with current students, with former students, or with strangers from Zanzibar.
Q2) Is it ethical to publish the paper based on my friend's dissertation? (i mean it is legal, because she will be referencing his phd dissertation but is it ethical to sideshaft the original author)
There are a few different possibilities here:
Your advisor's submission does not report your friend's thesis work as her own, but rather builds on your friend's work in a novel direction. In this case, your advisor's submission is ethical, but perhaps a bit unfriendly. After all, the success of her students is a significant component of her upcoming tenure case.
The results in your friend's dissertation are the main topic of your advisor's submission, but your friend did not make a significant and novel contribution, and therefore does not deserve coauthorship. But in this case, your friend also does not deserve a PhD, and your advisor's signing his thesis was unethical. This possibility seems highly unlikely; passing a thesis defense generally requires the unanimous approval of the entire thesis committee.
Your friend made a significant and novel contribution, which is the main topic of your advisor's paper. In this case, your advisor is being grossly unethical. Fortunately, since your friend's dissertation is easily accessible online (Isn't it?), any competent referee or editor should quickly spot the intellectual theft. That would just be stupid.
I came to know last week that my advisor wrote the paper herself and got it published.
If you believe that your advisor has stolen credit for another person's work—your friend, her former student, or a stranger from Zanzibar—it would be appropriate for you (or better yet, your friend) to speak discreetly to your department head or another trusted senior faculty member, with both the original dissertation and your advisor's publication in hand, asking them to clarify the ethical boundaries. Do not accuse; such accusations are very serious, and your advisor's colleagues may react defensively on her behalf. Instead, explain the delicacy of the situation and ask for guidance. And then listen.
They may react badly anyway, but then you have your answer.
If they agree that your advisor has acted unethically, get out of the way. This is not your fight.
Is it common in academia to do this?
No. I won't claim they never happen, obviously, but serious breaches of ethical behavior, at the level you are accusing, are extremely rare.
Q3 One more question i have is should i be listed as co-author for all papers coming out of this research because i developed the apps that formed basis for this research. I mean the concept for them was not mine but i did program them.
That is a more subtle question. As a general rule, I would say no. Of course you deserve credit for your contributions, but only once for each contribution. If your contribution is a key piece of software, then the first paper that uses that software should describe that software in detail and include you as a coauthor. If you walk away after that first paper, later work that relies on your software—by your advisor or anyone else—need not list you as a coauthor; you already got credit. With good reason, Stephen Wolfram is not a coauthor on every paper that uses Mathematica. You should of course be cited in any paper that uses, builds on, or improves your work, but that's a separate issue from coauthorship.
But reality is rarely so cut and dried. Is moving the software to a new platform a sufficient contribution? Optimizing the underlying algorithms? Adding a new, easy-to-implement feature suggested by your advisor? Adding a new, hard-to-implement feature suggested by your advisor? Adding support for a new input device? I have no idea. You and your advisor should have agreed in advance on the contribution required for you to be a coauthor.
Normally, if you had not had this conversation already, I would recommend having it now, but it sounds like it may be too late for that. You may be better off simply walking away and finding a new advisor that you can trust.