Average salary of a software engineer:
What salary figure shall a developer from India quote to a German (foreign) company with relocation?
The average salary range in 2015 was 40K to 60K depending on region. Personally I'd say that's for experienced people, I surely did not start out on €40K.
Please note that for everyone above that, to be an average, someone has to be below it. As a software developer you won't get stinkin' rich, but even with a below average salary, you can easily finance a rented apartment, car, family and holiday trips. Being paid below average is not the end of the world, you can live a pretty happy life with the wages of a software engineer even below average.
German salaries vary a lot because a good part of the salary is used to cover the cost of living. For example, for €40K one can easily and comfortably live in Hannover (capital of a federal state) while making 40K in Munich (capital of another federal state) probably means you have to sleep under a bridge or live out of town and commute for 1-2 hours.
As you relocate here, I would expect the company to offer you the normal salary they offer all their employees. If it's a large company, they may have something called a "Tarifvertrag", a contract between their union and the company what to pay for which job. If they do have one, that's great on one hand because they will not be allowed to pay you less and you can be relatively sure that the colleagues that do the same job get paid the same. On the other hand, it's harder to get more, too, because that's bureaucratic overhead.
Your best bet probably is to tell them that you tried to get information about German salary structures but the range is so wide that you'd rather hear their offer first. If you have to quote, I'd not just quote a number, but also include how you got there. That makes it easier on their part to react to it. For example, if you said "50k" and they cannot pay 50K, that's bad. If you say "People told me 50K is the average for your region", then it's easier for them to jump in and reply with "that's correct, we pay a bit below average but we offer those other benefits...".
Best is not to quote at all, but to wait for an offer. It's a different country. You can't go from "average salary" to what you would like to get; most likely it would be too little or too much for the position.
If they are asking explicitly for a quote, then you should tell that since you never lived in Germany, and you don't know anything about their area (the area probably makes 20% or more difference in wages), you are not able to judge what an appropriate salary for the position would be.
A decent company will offer you a reasonable salary. If you come up with a salary that is either too high you will not get the job, when you were perfectly willing to accept a reasonable salary. If you come up with a salary that is too low they have an excuse to pay you a miserable salary.
If you leave it to them, they have to actively suggest a lowball salary if they want to rip you off. Many people who are willing to take advantage of your mistakes (taking advantage of a too low quote) are not willing to actively rip you off (make a ridiculously low offer to someone who doesn't know the market), so that will be to your advantage.
If they absolutely insist on a quote, then something is dodgy with that company.
I am from germany.
The answer is it is best to not quote at all. In germany the disparity in living costs is quite drastic (going anywhere from 2500eur. /mo rent for a small apartment in or near downtown frankfurt to 250 eur. /mo rent for a big apartment in the middle of nowhere somewhere rural).
So it is generally a very good idea to let the employer come up with the first number, and then negotiate from there.
If you are going to relocate to Germany, quote the salary which is generally offered, in Germany.
If you are staying in India, quote salary a bit higher than what is offered in India, but keep it reasonable. (25% more than the Indian salary should do.)
If you are working remote, then quote a salary which is higher than the one recommended in the second step. (But, this is a tricky situation, some companies pay remote employees similar salaries as the other ones, and some go with the cost-of-living equation. So, get your homework about the company and it's policies right, before you quote.)
The problem is there are significant differences based on exact location, industry, and level of experience. These differences add up to about a factor of 4. For someone fresh from university, the difference is still up to 100% more for the higher end salary than the lower end.
Even we who know a lot about Germany can't tell, so how could you?
Be honest, tell them you saw on the web that the average for someone with your skills seems to be XYZ, but you don't feel comfortable quoting an exact figure because you cannot account for regional and industry differences, and are not yet familiar with the cost of living in [city in Germany you'd locate to].