Publishing as an undergraduate student: can/should I list my university affiliation?
Ask one of your professors or the administration about what the best course of action is.

Most likely, you should publish as affiliated to the university as the work was conducted while you were at university. In any case, you have nothing to lose by doing so.