Generally interviewers ask this at the start to figure out where you feel your strengths are. Give values in accordance to how many questions you might want on the subject. From looking at a CV it's often hard to tell where a developer has the most experience. A good interviewer will only ask questions to skills you've listed on your CV. I might interview a candidate who knows a lot of .Net for a Java position. A good developer shouldn't have trouble picking up a new language or skill. If the candidate knows the position is for Java and ranks their Java higher than their .Net skills, then they are doing themselves a disservice.
As a general guide, if you think you know more about the subject than the person who will likely interview you, rank yourself a 9. Don't go for the 10, because even if you know more about a subject than the interviewer, the question asker can usually come up with the question to which you don't know the answer off hand. If you rank yourself to high and get several questions in a row wrong, then the interviewer might give up, feeling you don't have a realistic view of your skills.
Probably most of your skills should rank 3-8. Below 3, it's not worth putting the term on your CV, and 8 generally means you know the subject pretty well but haven't written a book on it.