How can I improve my research experience for PhD application? It's well-known that many grad schools (especially top-ranked) require some research experience from prospective students and consider this as main criterion for accept/reject decision.

During undergraduate study I was working on my research (hadn't finished it - had solved just one particular case) - but can't say it was great research. Now I work as software developer in subdivision of national Academy of Science. My position requires only coding, no problem solving (there's no projects here requiring any fundamential research).

How can I make any research (better related to my field of interests) without being undergrad or MS student, without working in lab. Can I simply choose interesting problem (e.g. my undegrad problem), work hard to solve it and then refer to that in research statement? Who should write letter of recommendation in this case? Or I must have any advisor (who can verify my results and then write recommendation letter for me)? Can it be unofficial advisor (just researcher I know well)?
From my experience, there are three reasons why potential advisors want to see undergraduate research:


Show that the student cares enough about research to actually have participated in research during their undergraduate years.
Student is at least somewhat familiar with the ins-and-outs of performing academic research in a university setting.
The quality of the performed research may give some indication as to how "good" of a student the candidate will be.


If you perform research yourself outside of the university settings, you'll provide a strong showing for (1), nothing at all for (2), and given that you're unlikely to publish anything, nothing of much use to the advisor for (3).

To that end, I would try to get a job as a research assistant before applying. (I'm not sure this position exists in all fields.) This is usually a paid position, and will give you an experience to work with research, help run a lab, learn about academia, and and even possibly work towards being acknowledged--or even possibly a co-author, although that's unlikely--in a paper. It should help your application significantly.