For undergraduates, is publishing "weak" research better than not publishing? As an undergraduate student, I have worked on some projects for my own interest, and recently a professor said that one of these works can be published (in a Elsevier journal with impact factor of about 2). I personally think that this work is not strong enough to be published and included in my resume. (I don't have any prior experience in publishing and related stuff.) 

Can a weak research article published in a journal affect my application for graduate school in a negative way?
There are very few circumstances under which I think it's a bad idea for undergraduates to write research papers. These primarily have to do with the quality of the journal: so long as it is a reputable, peer-reviewed journal, I wouldn't be too concerned with the "strength" of the work.

The reason is that publishing while an undergraduate—particularly as a primary author—demonstrates that you have already started to learn the basics of how to do research in your field. This means that you're less of an "unknown" quantity, and therefore less of a risk for a department reviewing your application. If you don't publish the research, then there's no tangible proof, and then you need to rely on your research supervisor to make that point in a letter of recommendation. (But then the question becomes: "if she could have written a paper, why didn't she?")

As for the exceptions above, so long as you don't publish in "vanity" journals (those which will publish basically anything, so long as people pay the appropriate publication "fees"), you should be fine.