How much programming experience is needed before contacting a college professor for research/internship?
There isn't any general rule about the level of programming required to work as a research assistant in computer science. There are many different subfields in computer science, and in many of them, doing research does not involve any programming at all. At the other extreme, some research projects might only be suitable for students with highly specialized knowledge in a particular kind of programming.

Even the same professor might have multiple projects, some of which require prior programming experience and some of which don't. 

I am a researcher in the field of computer networks, and I work with high school students in the summer. I don't require any prior programming experience. Some of my students have prior experience, and some don't, but none of them have experience in the specifics of my research area, anyway. In general, for students with no research experience, I am looking for general qualities - learns quickly, responsible, punctual, good at taking feedback, good at writing notes and documenting their work - rather than any specific kind of technical expertise.

(P.S. I do not hire high school research students who contact me by themselves - I work with students who apply through a high school summer research program organized by my university. I encourage you to look for opportunities like that.)