If I use software like WAMP to test and develop my PHP websites, can someone access my computer and steal data or view my in-development websites, or even hack my computer?
Yes, it is possible as long as you are connected to the internet, check your network configuration that could possibly expose the machine you're using which has WAMP installed.
Let's say for example your router is configured to port forward all ports to the IP of your machine and you also have a vulnerable version of WordPress installed inside your WAMP, the attacker can use that to run code on your machine and install anything on it.
If you are running MS Windows then you are already probably exposing a lot of your computer to your local network. To what extent that is then exposed to a potential hacker depends on how your network is configured.
Mysql/PHP is a really easy environment to configure, develop for and deploy code to - this is one of the reasons it is so popular, unfortunately learning how to do this securely is a lot more involved.
Setting up a (another) server on your computer running immature code will leave it a lot more exposed. As long as you restrict it to just the loopback interface should address most (>99%) of the threats.
I found a series of vulnerabilities in MAMP that makes it possible to trigger remote code execution through CSRF. When you visit the attacker's site, that site performs a request to localhost:8888 where your local Apache runs a vulnerable web application, triggering the remote code execution. So I would say it is a real possibility that you get hacked through your development setup.
So if I use a software like Wamp to test and develop my PHP websites, can someone access my computer and steal data or view my in-development websites, or even hack my computer?
Your local WAMP PHP development environment is not going to let attacker gain remote shell, unless there is backdoor in the WAMP install. Install WAMP from reliable source and verify your download.
You should be worried about how you connect to the internet, that can lead to gain access. For example, sites your browse. If you are not using MS, take a look at Qubes OS, which creates isolated working environments.