So many choices and things to consider in this. Starting with what OS is this happening on?
A lot of operating systems will preferentially use a LAN cable rather than wifi if on the same network. If something along that path is wrong then it would potentially see something like this even if wifi is still available.
Does the internet work on the machine if you have a LAN cable? Or at least can you speak to the router? If internet does not work you might also need to twiddle a setting on your minecraft server to allow offline play (affectionately know as a pirate mode in many minecraft communities).
Anyway usual things I would look at first.
1) The LAN cable port is not static IP or something and set to go to the wrong subnet or gateway (or maybe even conflicting).
2) Some routers have a guest mode that prevents things from speaking to things on the LAN network.
3) Firewall on the computer and firewall on the router. For the former then yeah whatever firewall/allow this program to access the internet you have for that. For the firewall on the router if you have it set to forward certain ports for this host/mac address/IP address (maybe the static one from the earlier point) then it might sit it in a different part of the network that your other devices can't speak to.
Those are usually what solves most issues in this sort of thing if you are not playing with high end routers (think Cisco and Juniper or sink or swim DDWRT type builds for custom firmwares that you have to know networking for, your average home or small business router is not that though and will tend to work out of the box). You might still have to go back and put in some kind of security on the system if you just completely disabled firewalls to test but it is what it is.
There are all sorts of things it could be after that, though I do wonder about hardware issues here (sometimes a dodgy port on either the host machine or router can trouble things).