Were the photos stored on either the internal or the SD storage? Either way, these both use NAND flash memory, which does have a finite life and there's an chance it maybe going bad(wearing out), it can only be written to a finite number of times. Losing data can be a symptom of bad storage. If it's just the SD going bad, that's easy to replace, on the other hand if it's the phone's internal storage going bad, which is also flash memory, you'll have to buy a new phone. You didn't get any warning about storage being damaged did you, before the pictures disappeared? Don't know if you can do anything to try and retrieve them, there are tools for that.
The important thing is to always backup, especially irreplaceable photos.