How to write the information related to referees in an application form? What's the best way to give information about the person who's going to give recommendation letter, in an application form?

John Clark, Ph.D. in Physics and Mathematics
Associate Professor
Teacher of 'Web Programming' course during the 6th semester
Email address: email.address@example.com
Telephone Number: +00 1234 5678

Is there any need for the 3rd line, at all? Do I need to add information related to the department the person is working in?
Looks to me like you've left out the "organization" and the mailing address. I'd change line 2 to something like: "Associate Professor, Department of Physics, The University of Exampleville". Then you should add several lines below the telephone number that gives the work mailing address of your recommender. If they can't provide that to you directly, you can almost certainly provide the departmental mailing address which should be on their website.