Hi,
The Epson XP-400 is listed in About AirPrint - Apple Support as a model supporting the driverless AirPrint technology. This means that it should work without additional drivers when connected to the same network (Wi-Fi router) as the Mac.
So, to begin with, check that it is possible to connect the printer to your home Wi-Fi network. If necessary, and if the router supports it, you could try WPS (Wi-Fi Protected Setup). Once the printer is connected to the Wi-Fi router, you should be able to add it as an AirPrint printer.
Add a printer to your printer list so you can use it on Mac – Apple Support (UK)
Reset the printing system on your Mac to solve a problem – Apple Support (UK)
You could also test the AirPrint capability via an iPhone or iPad.
Use AirPrint to print from your iPhone, iPad, or iPod touch - Apple Support
If there is a problem with AirPrint discovery for one or more devices, you may want to try the following full procedure (in the exact order):
Power off the Wi-Fi router, the printer, the Mac computer, and all other devices/computers. Wait two to three minutes. Power on the router. Wait two to three minutes. Power on the printer. Wait a minute or two. Power on the Mac computer. Finally, power on all other devices/computers.