find nearest value in a wave

How can I find the index of the nearest value in a wave?

You mean the point which is closest to the input y value? Use FindLevel for that (or FindLevels if you have multiple occurrences of the same value).