Can I write publications if I don't have co-authors?
Yes it definitely can be done.

If you have an idea then do a literature review of the subject and if you have a contribution that builds on the activity in one of the journals you find then publish there. Perhaps also look into doing a conference paper first. See here for the difference between the two.

The best co-author for your case would probably be a professor or grad student at your university.

No, co-authors are not required. They can be useful though if you need their help/skills in the project.

In computer science, journal papers usually occur during one’s PhD. Bright Masters and Honours students usually start publishing conference papers, but journal papers are not unheard of.