When the customer adds a product to his wishlist, you must store this information in the database in order to retrieve it later.
The main question here is: how do you set that a product is now available?
If you do it from your application, with a form for example, and if you have to request your application, then you can simply run a task in your controller. That way, when you mark a product as available, you just have to search for the persons that put this product in their wishlist and to send them an email (see ActionMailer).
But, if this is not you (or a user) that change the availability state of a product (for example, it's an external program that change the database data), then, you can run a task each x minutes/hours/... to check if wishlisted products are now available. You can give a look at ActiveJob for this.