Hi Jojo, I don't have this problem myself, but this is a good forum for the Hero – this post looks similar to yours.
http://forum.xda-developers.com/showthread.php?t=541105
There seems to be a few suggestions
1) Use 'Wifi Fixer' from the market which automatically reconnects. I couldn't find this on the market, only the old version which isn't what you want…
2) Play around with some router settings. What router have you got?
Try this, or see if there's a similar setting on your router admin page.
"turning on the WiFi "Mixed-Mode" with B/G Mode together solved the issue."
Basically it suggests the problem is perhaps with the router, and I tend to agree with this.
I run a Hero with the 1.5 fireware which is what most people will be using unless they fiddle with their phone and root it. I've never had any problems connecting to a variety of wifi networks, which suggests the problem is more likely with your router (somewhere!).